Skip to content
Snippets Groups Projects
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 <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 28a45bfc
No related branches found
No related tags found
No related merge requests found
...@@ -6374,10 +6374,12 @@ def _AssembleInstanceDisks(lu, instance, disks=None, ignore_secondaries=False, ...@@ -6374,10 +6374,12 @@ def _AssembleInstanceDisks(lu, instance, disks=None, ignore_secondaries=False,
False, idx) False, idx)
msg = result.fail_msg msg = result.fail_msg
if msg: if msg:
is_offline_secondary = (node in instance.secondary_nodes and
result.offline)
lu.proc.LogWarning("Could not prepare block device %s on node %s" lu.proc.LogWarning("Could not prepare block device %s on node %s"
" (is_primary=False, pass=1): %s", " (is_primary=False, pass=1): %s",
inst_disk.iv_name, node, msg) inst_disk.iv_name, node, msg)
if not ignore_secondaries: if not (ignore_secondaries or is_offline_secondary):
disks_ok = False disks_ok = False
   
# FIXME: race condition on drbd migration to primary # FIXME: race condition on drbd migration to primary
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment