Merge branch 'devel-2.4'
authorMichael Hanselmann <hansmi@google.com>
Fri, 22 Jul 2011 09:05:55 +0000 (11:05 +0200)
committerMichael Hanselmann <hansmi@google.com>
Fri, 22 Jul 2011 09:07:42 +0000 (11:07 +0200)
* devel-2.4:
  gnt-node volumes: Fix instance names

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

1  2 
lib/cmdlib.py

diff --cc lib/cmdlib.py
@@@ -4249,13 -3768,15 +4250,15 @@@ class LUNodeQueryvols(NoHooksLU)
      """Computes the list of nodes and their attributes.
  
      """
 -    nodenames = self.acquired_locks[locking.LEVEL_NODE]
 +    nodenames = self.glm.list_owned(locking.LEVEL_NODE)
      volumes = self.rpc.call_node_volumes(nodenames)
  
-     ilist = [self.cfg.GetInstanceInfo(iname) for iname
-              in self.cfg.GetInstanceList()]
+     ilist = self.cfg.GetAllInstancesInfo()
  
-     lv_by_node = dict([(inst, inst.MapLVsByNode()) for inst in ilist])
+     vol2inst = dict(((node, vol), inst.name)
+                     for inst in ilist.values()
+                     for (node, vols) in inst.MapLVsByNode().items()
+                     for vol in vols)
  
      output = []
      for node in nodenames: