Commit 9af0fa6a authored by Iustin Pop's avatar Iustin Pop
Browse files

Auto-enable early release for offline old nodes



In case the old node is offline, we won't be able to talk to it to
remove the storage, and in most cases the node is powered
off/unreachable.

In this case, it makes no sense to delay the storage release, so we
enable automatically early_release mode, gaining parallelism during node
evacuation.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 650fd0c8
......@@ -6715,6 +6715,14 @@ class TLReplaceDisks(Tasklet):
_CheckNodeNotDrained(self.lu, remote_node)
old_node_info = self.cfg.GetNodeInfo(secondary_node)
assert old_node_info is not None
if old_node_info.offline and not self.early_release:
# doesn't make sense to delay the release
self.early_release = True
self.lu.LogInfo("Old secondary %s is offline, automatically enabling"
" early-release mode", secondary_node)
else:
raise errors.ProgrammerError("Unhandled disk replace mode (%s)" %
self.mode)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment