This fixes issue 432: when setting the volume group name, the presence
of the volume group was checked on all nodes. This patch now restricts
the check only to the vm-capable ones.

Signed-off-by: Helga Velroyen <[email protected]>
---
 lib/cmdlib.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index bcf6724..082d558 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -4213,10 +4213,14 @@ class LUClusterSetParams(LogicalUnit):
 
     node_list = self.owned_locks(locking.LEVEL_NODE)
 
+    vm_capable_nodes = [node.name
+                        for node in self.cfg.GetAllNodesInfo().values()
+                        if node.name in node_list and node.vm_capable]
+
     # if vg_name not None, checks given volume group on all nodes
     if self.op.vg_name:
-      vglist = self.rpc.call_vg_list(node_list)
-      for node in node_list:
+      vglist = self.rpc.call_vg_list(vm_capable_nodes)
+      for node in vm_capable_nodes:
         msg = vglist[node].fail_msg
         if msg:
           # ignoring down node
-- 
1.8.2.1

Reply via email to