Commit 742dc8de authored by Helga Velroyen's avatar Helga Velroyen

Node names in NV_VMNODES

This patch populates the list 'NV_VMNODES' with node
names and not node UUIDs, as the backend only uses this
list to identify VM-capable nodes by querying for the
node name.
Signed-off-by: default avatarHelga Velroyen <helgav@google.com>
Reviewed-by: default avatarHrvoje Ribicic <riba@google.com>
parent fe42a791
......@@ -2960,7 +2960,7 @@ class LUClusterVerifyGroup(LogicalUnit, _VerifyErrors):
constants.NV_TIME: None,
constants.NV_MASTERIP: (self.cfg.GetMasterNodeName(), master_ip),
constants.NV_OSLIST: None,
constants.NV_VMNODES: self.cfg.GetNonVmCapableNodeList(),
constants.NV_VMNODES: self.cfg.GetNonVmCapableNodeNameList(),
constants.NV_USERSCRIPTS: user_scripts,
}
......
......@@ -1981,13 +1981,22 @@ class ConfigWriter(object):
@locking.ssynchronized(_config_lock, shared=1)
def GetNonVmCapableNodeList(self):
"""Return the list of nodes which are not vm capable.
"""Return the list of nodes' uuids which are not vm capable.
"""
all_nodes = [self._UnlockedGetNodeInfo(node)
for node in self._UnlockedGetNodeList()]
return [node.uuid for node in all_nodes if not node.vm_capable]
@locking.ssynchronized(_config_lock, shared=1)
def GetNonVmCapableNodeNameList(self):
"""Return the list of nodes' names which are not vm capable.
"""
all_nodes = [self._UnlockedGetNodeInfo(node)
for node in self._UnlockedGetNodeList()]
return [node.name for node in all_nodes if not node.vm_capable]
@locking.ssynchronized(_config_lock, shared=1)
def GetMultiNodeInfo(self, node_uuids):
"""Get the configuration of multiple nodes.
......
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