Commit 11dcce87 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix error msg for instances on offline nodes



Currently, for both primary and secondary offline nodes, we give the
same message:
- ERROR: instance instance14: instance lives on offline node(s) node3
- ERROR: instance instance15: instance lives on offline node(s) node3
- ERROR: instance instance16: instance lives on offline node(s) node3
- ERROR: instance instance17: instance lives on offline node(s) node3

This is confusing, as an offline primary is in a different category
than a secondary. The patch changes the warnings to have different
error messages:
- ERROR: instance instance14: instance has offline secondary node(s) node3
- ERROR: instance instance15: instance has offline secondary node(s) node3
- ERROR: instance instance16: instance lives on offline node node3
- ERROR: instance instance17: instance lives on offline node node3

Thanks to Alexander Schreiber <als@google.com> for reporting this
issue.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarAlexander Schreiber <als@google.com>
parent 3d2e7a27
......@@ -2300,8 +2300,8 @@ class LUClusterVerify(LogicalUnit):
self.ENODERPC, pnode, "instance %s, connection to"
" primary node failed", instance)
if pnode_img.offline:
inst_nodes_offline.append(pnode)
_ErrorIf(pnode_img.offline, self.EINSTANCEBADNODE, instance,
"instance lives on offline node %s", inst_config.primary_node)
# If the instance is non-redundant we cannot survive losing its primary
# node, so we are not N+1 compliant. On the other hand we have no disk
......@@ -2350,7 +2350,7 @@ class LUClusterVerify(LogicalUnit):
# warn that the instance lives on offline nodes
_ErrorIf(inst_nodes_offline, self.EINSTANCEBADNODE, instance,
"instance lives on offline node(s) %s",
"instance has offline secondary node(s) %s",
utils.CommaJoin(inst_nodes_offline))
# ... or ghost/non-vm_capable nodes
for node in inst_config.all_nodes:
......
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