Commit f9dfa8df authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Merge branch 'stable-2.8' into stable-2.9



* stable-2.8
  Improve error message for replace-disks

Conflicts:
	lib/cmdlib/instance_storage.py
Resolved by manually applying the node name to uuid
transition on the version of stable-2.9.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
parents a50b49b8 34ea8da3
......@@ -2209,8 +2209,15 @@ class TLReplaceDisks(Tasklet):
if msg or not result.payload:
if not msg:
msg = "disk not found"
raise errors.OpExecError("Can't find disk/%d on node %s: %s" %
(idx, self.cfg.GetNodeName(node_uuid), msg))
if not self._CheckDisksActivated(self.instance):
extra_hint = ("\nDisks seem to be not properly activated. Try"
" running activate-disks on the instance before"
" using replace-disks.")
else:
extra_hint = ""
raise errors.OpExecError("Can't find disk/%d on node %s: %s%s" %
(idx, self.cfg.GetNodeName(node_uuid), msg,
extra_hint))
def _CheckDisksConsistency(self, node_uuid, on_primary, ldisk):
for idx, dev in enumerate(self.instance.disks):
......
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