Fix iallocator for nodegroups with no tags
authorDimitris Aragiorgis <dimara@grnet.gr>
Thu, 20 Dec 2012 14:16:39 +0000 (16:16 +0200)
committerMichael Hanselmann <hansmi@google.com>
Fri, 21 Dec 2012 09:24:43 +0000 (10:24 +0100)
_ComputeNodeGroupData() raises error if a group has no tags
when list(gdata.tags) is invoked. Use “gdata.GetTags()” instead.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

lib/masterd/iallocator.py

index 45b0ba1..b6a8afd 100644 (file)
@@ -458,7 +458,7 @@ class IAllocator(object):
       "name": gdata.name,
       "alloc_policy": gdata.alloc_policy,
       "ipolicy": gmi.CalculateGroupIPolicy(cluster, gdata),
-      "tags": list(gdata.tags),
+      "tags": list(gdata.GetTags()),
       })
       for guuid, gdata in cfg.GetAllNodeGroupsInfo().items())