Commit 832261fd authored by Iustin Pop's avatar Iustin Pop
Browse files

Warn for instances living on offline nodes

The patch also changes the result to error for non-reachable secondary nodes
(as for primary nodes).

Reviewed-by: ultrotter
parent ee513a66
......@@ -986,6 +986,7 @@ class LUVerifyCluster(LogicalUnit):
result = self._VerifyInstance(instance, inst_config, node_volume,
node_instance, feedback_fn, n_offline)
bad = bad or result
inst_nodes_offline = []
......@@ -999,6 +1000,9 @@ class LUVerifyCluster(LogicalUnit):
" %s failed" % (instance, pnode))
bad = True
if pnode in n_offline:
# 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
# templates with more than one secondary so that situation is not well
......@@ -1022,6 +1026,15 @@ class LUVerifyCluster(LogicalUnit):
elif snode not in n_offline:
feedback_fn(" - ERROR: instance %s, connection to secondary node"
" %s failed" % (instance, snode))
bad = True
if snode in n_offline:
if inst_nodes_offline:
# warn that the instance lives on offline nodes, and set bad=True
feedback_fn(" - ERROR: instance lives on offline node(s) %s" %
", ".join(inst_nodes_offline))
bad = True
feedback_fn("* Verifying orphan volumes")
result = self._VerifyOrphanVolumes(node_vol_should, node_volume,
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