Set the size on new DRBDs in replace secondary
authorIustin Pop <iustin@google.com>
Thu, 28 May 2009 16:23:19 +0000 (18:23 +0200)
committerIustin Pop <iustin@google.com>
Thu, 28 May 2009 17:55:35 +0000 (19:55 +0200)
Currently the code in cmdlib doesn't set the device size to new DRBD
devices in replace secondary, but we need to do it otherwise it gets
initialized to None.

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

lib/cmdlib.py

index 1ab20ac..f034c1e 100644 (file)
@@ -5382,7 +5382,8 @@ class LUReplaceDisks(LogicalUnit):
                     new_net_id)
       new_drbd = objects.Disk(dev_type=constants.LD_DRBD8,
                               logical_id=new_alone_id,
-                              children=dev.children)
+                              children=dev.children,
+                              size=dev.size)
       try:
         _CreateSingleBlockDev(self, new_node, instance, new_drbd,
                               _GetInstanceInfoText(instance), False)