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

Verify: instance verification cleanup

The instance configuration is grabbed both in the _VerifyInstance function and
in the loop that calls it. Clean this up by passing the configuration as a

Reviewed-by: imsnah
parent a872dae6
......@@ -675,7 +675,8 @@ class LUVerifyCluster(NoHooksLU):
feedback_fn(" - ERROR: hypervisor verify failure: '%s'" % hyp_result)
return bad
def _VerifyInstance(self, instance, node_vol_is, node_instance, feedback_fn):
def _VerifyInstance(self, instance, instanceconfig, node_vol_is,
node_instance, feedback_fn):
"""Verify an instance.
This function checks to see if the required block devices are
......@@ -690,7 +691,6 @@ class LUVerifyCluster(NoHooksLU):
(instance, instancelist))
bad = True
instanceconfig = self.cfg.GetInstanceInfo(instance)
node_current = instanceconfig.primary_node
node_vol_should = {}
......@@ -828,11 +828,10 @@ class LUVerifyCluster(NoHooksLU):
for instance in instancelist:
feedback_fn("* Verifying instance %s" % instance)
result = self._VerifyInstance(instance, node_volume, node_instance,
bad = bad or result
inst_config = self.cfg.GetInstanceInfo(instance)
result = self._VerifyInstance(instance, inst_config, node_volume,
node_instance, feedback_fn)
bad = bad or result
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