Commit d908ba61 authored by Iustin Pop's avatar Iustin Pop
Browse files

Allow instance disc activation with offline secondaries

Currently, this is not allowed, so one can't run a replace-disks; this
breaks any non-invasive method of recovering the redundancy of the
instance if its disks are already stopped (but it still works if the
disks on the primary are active). So let's fix this inconsistency.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarRené Nussbaumer <>
parent 28a45bfc
......@@ -6374,10 +6374,12 @@ def _AssembleInstanceDisks(lu, instance, disks=None, ignore_secondaries=False,
False, idx)
msg = result.fail_msg
if msg:
is_offline_secondary = (node in instance.secondary_nodes and
lu.proc.LogWarning("Could not prepare block device %s on node %s"
" (is_primary=False, pass=1): %s",
inst_disk.iv_name, node, msg)
if not ignore_secondaries:
if not (ignore_secondaries or is_offline_secondary):
disks_ok = False
# FIXME: race condition on drbd migration to primary
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