Revision 7df43a76 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
3329 | 3329 |
raise errors.OpPrereqError("Instance '%s' not known" % |
3330 | 3330 |
self.op.instance_name) |
3331 | 3331 |
self.instance = instance |
3332 |
self.op.instance_name = instance.name |
|
3332 | 3333 |
|
3333 | 3334 |
if instance.disk_template not in constants.DTS_NET_MIRROR: |
3334 | 3335 |
raise errors.OpPrereqError("Instance's disk layout is not" |
... | ... | |
3367 | 3368 |
raise errors.OpPrereqError("Template 'remote_raid1' only allows all" |
3368 | 3369 |
" disks replacement, not individual ones") |
3369 | 3370 |
if instance.disk_template == constants.DT_DRBD8: |
3371 |
if (self.op.mode == constants.REPLACE_DISK_ALL and |
|
3372 |
remote_node is not None): |
|
3373 |
# switch to replace secondary mode |
|
3374 |
self.op.mode = constants.REPLACE_DISK_SEC |
|
3375 |
|
|
3370 | 3376 |
if self.op.mode == constants.REPLACE_DISK_ALL: |
3371 | 3377 |
raise errors.OpPrereqError("Template 'drbd8' only allows primary or" |
3372 | 3378 |
" secondary disk replacement, not" |
Also available in: Unified diff