Remove 15-second sleep from LUInstanceCreate
authorApollon Oikonomopoulos <apollon@noc.grnet.gr>
Wed, 3 Aug 2011 15:04:08 +0000 (18:04 +0300)
committerIustin Pop <iustin@google.com>
Thu, 4 Aug 2011 14:01:56 +0000 (16:01 +0200)
Remove 15 second sleep when wait_for_sync is not set. LUInstanceCreate already
calls _WaitForSync with oneshot=True, which already performs an internal
wait-loop for disks to start syncing.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

lib/cmdlib.py

index 782cc2f..d6bf26e 100644 (file)
@@ -8873,7 +8873,6 @@ class LUInstanceCreate(LogicalUnit):
       disk_abort = not _WaitForSync(self, iobj)
     elif iobj.disk_template in constants.DTS_INT_MIRROR:
       # make sure the disks are not degraded (still sync-ing is ok)
-      time.sleep(15)
       feedback_fn("* checking mirrors status")
       disk_abort = not _WaitForSync(self, iobj, oneshot=True)
     else: