(fix) SetDiskID() before blockdev_assemble()
authorDimitris Aragiorgis <dimara@grnet.gr>
Sun, 8 Dec 2013 05:43:33 +0000 (07:43 +0200)
committerDimitris Aragiorgis <dimara@grnet.gr>
Thu, 27 Mar 2014 07:56:54 +0000 (09:56 +0200)
Before blockdev_assemble we call SetDiskID() in order to fill up
physical_id of disk needed by bdev.Assemble and eventually by
constructor of each BlockDev.

This is not needed in 2.10 since physical_id has become deprecated.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>

lib/cmdlib/instance.py

index 37ceb5b..fa0163f 100644 (file)
@@ -3208,6 +3208,7 @@ class LUInstanceSetParams(LogicalUnit):
                          cleanup=new_disks)
 
     if self.op.hotplug:
+      self.cfg.SetDiskID(disk, self.instance.primary_node)
       result = self.rpc.call_blockdev_assemble(self.instance.primary_node,
                                                (disk, self.instance),
                                                self.instance.name, True, idx)