Commit 8522ceeb authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix logging of some checks in LUClusterVerify

Currently, the results of ConfigWriter.VerifyConfig() are lost. Make
sure we log them too in cluster verify.

Reviewed-by: ultrotter
parent 5736852e
......@@ -796,7 +796,8 @@ class LUVerifyCluster(NoHooksLU):
"""
bad = False
feedback_fn("* Verifying global settings")
self.cfg.VerifyConfig()
for msg in self.cfg.VerifyConfig():
feedback_fn(" - ERROR: %s" % msg)
vg_name = self.cfg.GetVGName()
nodelist = utils.NiceSort(self.cfg.GetNodeList())
......
......@@ -168,15 +168,15 @@ class ConfigWriter:
for instance_name in data.instances:
instance = data.instances[instance_name]
if instance.primary_node not in data.nodes:
result.append("Instance '%s' has invalid primary node '%s'" %
result.append("instance '%s' has invalid primary node '%s'" %
(instance_name, instance.primary_node))
for snode in instance.secondary_nodes:
if snode not in data.nodes:
result.append("Instance '%s' has invalid secondary node '%s'" %
result.append("instance '%s' has invalid secondary node '%s'" %
(instance_name, snode))
for idx, nic in enumerate(instance.nics):
if nic.mac in seen_macs:
result.append("Instance '%s' has NIC %d mac %s duplicate" %
result.append("instance '%s' has NIC %d mac %s duplicate" %
(instance_name, idx, nic.mac))
else:
seen_macs.append(nic.mac)
......
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