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

In this case, it makes no sense to delay the storage release, so we
enable automatically early_release mode, gaining parallelism during node
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarMichael Hanselmann <>
parent 650fd0c8
......@@ -6715,6 +6715,14 @@ class TLReplaceDisks(Tasklet):
_CheckNodeNotDrained(, 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"Old secondary %s is offline, automatically enabling"
" early-release mode", secondary_node)
raise errors.ProgrammerError("Unhandled disk replace mode (%s)" %
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