Revision 3b01286e
b/lib/cmdlib.py | ||
---|---|---|
9618 | 9618 |
self.x509_key_name = self.op.x509_key_name |
9619 | 9619 |
self.dest_x509_ca_pem = self.op.destination_x509_ca |
9620 | 9620 |
|
9621 |
if self.op.remove_instance and not self.op.shutdown: |
|
9622 |
raise errors.OpPrereqError("Can not remove instance without shutting it" |
|
9623 |
" down before") |
|
9624 |
|
|
9625 | 9621 |
if self.op.mode == constants.EXPORT_MODE_REMOTE: |
9626 | 9622 |
if not self.x509_key_name: |
9627 | 9623 |
raise errors.OpPrereqError("Missing X509 key name for encryption", |
... | ... | |
9687 | 9683 |
"Cannot retrieve locked instance %s" % self.op.instance_name |
9688 | 9684 |
_CheckNodeOnline(self, self.instance.primary_node) |
9689 | 9685 |
|
9686 |
if (self.op.remove_instance and self.instance.admin_up and |
|
9687 |
not self.op.shutdown): |
|
9688 |
raise errors.OpPrereqError("Can not remove instance without shutting it" |
|
9689 |
" down before") |
|
9690 |
|
|
9690 | 9691 |
if self.op.mode == constants.EXPORT_MODE_LOCAL: |
9691 | 9692 |
self.op.target_node = _ExpandNodeName(self.cfg, self.op.target_node) |
9692 | 9693 |
self.dst_node = self.cfg.GetNodeInfo(self.op.target_node) |
b/qa/ganeti-qa.py | ||
---|---|---|
430 | 430 |
|
431 | 431 |
if (qa_config.TestEnabled('instance-add-plain-disk') and |
432 | 432 |
qa_config.TestEnabled("instance-export")): |
433 |
instance = RunTest(qa_instance.TestInstanceAddWithPlainDisk, pnode) |
|
434 |
expnode = qa_config.AcquireNode(exclude=pnode) |
|
435 |
try: |
|
436 |
RunTest(qa_instance.TestInstanceExportWithRemove, instance, expnode) |
|
437 |
RunTest(qa_instance.TestBackupList, expnode) |
|
438 |
finally: |
|
439 |
qa_config.ReleaseNode(expnode) |
|
440 |
del expnode |
|
441 |
del instance |
|
433 |
for shutdown in [False, True]: |
|
434 |
instance = RunTest(qa_instance.TestInstanceAddWithPlainDisk, pnode) |
|
435 |
expnode = qa_config.AcquireNode(exclude=pnode) |
|
436 |
try: |
|
437 |
if shutdown: |
|
438 |
# Stop instance before exporting and removing it |
|
439 |
RunTest(qa_instance.TestInstanceShutdown, instance) |
|
440 |
RunTest(qa_instance.TestInstanceExportWithRemove, instance, expnode) |
|
441 |
RunTest(qa_instance.TestBackupList, expnode) |
|
442 |
finally: |
|
443 |
qa_config.ReleaseNode(expnode) |
|
444 |
del expnode |
|
445 |
del instance |
|
442 | 446 |
|
443 | 447 |
finally: |
444 | 448 |
qa_config.ReleaseNode(pnode) |
Also available in: Unified diff