Fix a bug in LURepairDiskSizes
authorIustin Pop <iustin@google.com>
Mon, 10 Aug 2009 11:40:11 +0000 (13:40 +0200)
committerIustin Pop <iustin@google.com>
Mon, 10 Aug 2009 12:00:59 +0000 (14:00 +0200)
The same old story: disks need SetDiskID before being sent to remote
nodes.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

lib/cmdlib.py

index cea239b..73c4e5d 100644 (file)
@@ -1394,7 +1394,10 @@ class LURepairDiskSizes(NoHooksLU):
 
     changed = []
     for node, dskl in per_node_disks.items():
-      result = self.rpc.call_blockdev_getsizes(node, [v[2] for v in dskl])
+      newl = [v[2].Copy() for v in dskl]
+      for dsk in newl:
+        self.cfg.SetDiskID(dsk, node)
+      result = self.rpc.call_blockdev_getsizes(node, newl)
       if result.failed:
         self.LogWarning("Failure in blockdev_getsizes call to node"
                         " %s, ignoring", node)