Fix verify config if a node has no instances
authorThomas Thrainer <thomasth@google.com>
Fri, 2 Aug 2013 05:29:45 +0000 (07:29 +0200)
committerThomas Thrainer <thomasth@google.com>
Fri, 2 Aug 2013 11:01:21 +0000 (13:01 +0200)
Do not try to provide a fake instance UUID called "no instances", as
trying to get the name for would fail and raise an exception.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

lib/cmdlib/cluster.py

index cef1bc5..4c4673f 100644 (file)
@@ -1476,7 +1476,7 @@ class LUClusterVerifyConfig(NoHooksLU, _VerifyErrors):
         (node.name,
          utils.CommaJoin(
            self.cfg.GetInstanceNames(
-             dangling_instances.get(node.uuid, ["no instances"]))))
+             dangling_instances.get(node.uuid, []))))
         for node in dangling_nodes]
 
     self._ErrorIf(bool(dangling_nodes), constants.CV_ECLUSTERDANGLINGNODES,