Commit d33d00ba authored by Thomas Thrainer's avatar Thomas Thrainer
Browse files

Fail in replace-disks if attaching disks fails



Previously, if attaching the new secondary during a replace-disks
operations failed, only a warning was emitted. The subsequent sync-disks
operation cannot finish in such a case, however.

Therefore, this patch changes the warning into an error. This way it's
possible for administrators to fix the problem and the cluster does not
remain in a blocked state.

This fixes issue 814.
Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
Reviewed-by: default avatarHrvoje Ribicic <riba@google.com>
parent 703508c0
......@@ -2575,10 +2575,10 @@ class TLReplaceDisks(Tasklet):
for to_node, to_result in result.items():
msg = to_result.fail_msg
if msg:
self.lu.LogWarning("Can't attach drbd disks on node %s: %s",
self.cfg.GetNodeName(to_node), msg,
hint=("please do a gnt-instance info to see the"
" status of disks"))
raise errors.OpExecError(
"Can't attach drbd disks on node %s: %s (please do a gnt-instance "
"info to see the status of disks)" %
(self.cfg.GetNodeName(to_node), msg))
cstep = itertools.count(5)
......
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