Revision f489fcc0
b/lib/cmdlib.py | ||
---|---|---|
8230 | 8230 |
if iobj.disk_template != constants.DT_DISKLESS and not self.adopt_disks: |
8231 | 8231 |
if self.op.mode == constants.INSTANCE_CREATE: |
8232 | 8232 |
if not self.op.no_install: |
8233 |
if (iobj.disk_template in constants.DTS_INT_MIRROR and not |
|
8234 |
self.op.wait_for_sync): |
|
8233 |
pause_sync = (iobj.disk_template in constants.DTS_INT_MIRROR and |
|
8234 |
not self.op.wait_for_sync) |
|
8235 |
if pause_sync: |
|
8235 | 8236 |
feedback_fn("* pausing disk sync to install instance OS") |
8236 | 8237 |
result = self.rpc.call_blockdev_pause_resume_sync(pnode_name, |
8237 | 8238 |
iobj.disks, True) |
... | ... | |
8242 | 8243 |
|
8243 | 8244 |
feedback_fn("* running the instance OS create scripts...") |
8244 | 8245 |
# FIXME: pass debug option from opcode to backend |
8245 |
result = self.rpc.call_instance_os_add(pnode_name, iobj, False,
|
|
8246 |
self.op.debug_level)
|
|
8247 |
if (iobj.disk_template in constants.DTS_INT_MIRROR and not
|
|
8248 |
self.op.wait_for_sync):
|
|
8246 |
os_add_result = \
|
|
8247 |
self.rpc.call_instance_os_add(pnode_name, iobj, False,
|
|
8248 |
self.op.debug_level)
|
|
8249 |
if pause_sync:
|
|
8249 | 8250 |
feedback_fn("* resuming disk sync") |
8250 | 8251 |
result = self.rpc.call_blockdev_pause_resume_sync(pnode_name, |
8251 | 8252 |
iobj.disks, False) |
... | ... | |
8254 | 8255 |
logging.warn("resume-sync of instance %s for disk %d failed", |
8255 | 8256 |
instance, idx) |
8256 | 8257 |
|
8257 |
result.Raise("Could not add os for instance %s" |
|
8258 |
" on node %s" % (instance, pnode_name)) |
|
8258 |
os_add_result.Raise("Could not add os for instance %s"
|
|
8259 |
" on node %s" % (instance, pnode_name))
|
|
8259 | 8260 |
|
8260 | 8261 |
elif self.op.mode == constants.INSTANCE_IMPORT: |
8261 | 8262 |
feedback_fn("* running the instance OS import scripts...") |
Also available in: Unified diff