Commit a872dae6 authored by Guido Trotter's avatar Guido Trotter
Browse files

Verify: fix crash when a node is down

Currently if ganeti-noded doesn't respond on a node gnt-cluster verify will die
when verifying primary instances for that node. Fix this by just emitting an
error message if no information about running instances is returned from the
node.

Reviewed-by: iustinp
parent c840ae6f
...@@ -704,7 +704,8 @@ class LUVerifyCluster(NoHooksLU): ...@@ -704,7 +704,8 @@ class LUVerifyCluster(NoHooksLU):
bad = True bad = True
if not instanceconfig.status == 'down': if not instanceconfig.status == 'down':
if not instance in node_instance[node_current]: if (node_current not in node_instance or
not instance in node_instance[node_current]):
feedback_fn(" - ERROR: instance %s not running on node %s" % feedback_fn(" - ERROR: instance %s not running on node %s" %
(instance, node_current)) (instance, node_current))
bad = True bad = True
......
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