Commit 075b62ca authored by Iustin Pop's avatar Iustin Pop

Another fix for LUClusterVerifyDisks

The LVM queries should only be done for vm_capable nodes. In order to
do this, we also add a new ConfigWriter method to abstract that query.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent c6953b6e
......@@ -2405,7 +2405,7 @@ class LUClusterVerifyDisks(NoHooksLU):
"""
result = res_nodes, res_instances, res_missing = {}, [], {}
nodes = utils.NiceSort(self.cfg.GetNodeList())
nodes = utils.NiceSort(self.cfg.GetVmCapableNodeList())
instances = [self.cfg.GetInstanceInfo(name)
for name in self.cfg.GetInstanceList()]
......
#
#
# Copyright (C) 2006, 2007, 2008, 2009, 2010 Google Inc.
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -1297,6 +1297,15 @@ class ConfigWriter:
"""
return self._UnlockedGetOnlineNodeList()
@locking.ssynchronized(_config_lock, shared=1)
def GetVmCapableNodeList(self):
"""Return the list of nodes which are not vm capable.
"""
all_nodes = [self._UnlockedGetNodeInfo(node)
for node in self._UnlockedGetNodeList()]
return [node.name for node in all_nodes if node.vm_capable]
@locking.ssynchronized(_config_lock, shared=1)
def GetNonVmCapableNodeList(self):
"""Return the list of nodes which are not vm capable.
......
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