Revision 99bdd139 tools/burnin
b/tools/burnin | ||
---|---|---|
165 | 165 |
parser.add_option("--no-failover", dest="do_failover", |
166 | 166 |
help="Skip instance failovers", action="store_false", |
167 | 167 |
default=True) |
168 |
parser.add_option("--no-migrate", dest="do_migrate", |
|
169 |
help="Skip instance live migration", |
|
170 |
action="store_false", default=True) |
|
168 | 171 |
parser.add_option("--no-importexport", dest="do_importexport", |
169 | 172 |
help="Skip instance export/import", action="store_false", |
170 | 173 |
default=True) |
... | ... | |
403 | 406 |
for instance in self.instances: |
404 | 407 |
self._CheckInstanceAlive(instance) |
405 | 408 |
|
409 |
def Migrate(self): |
|
410 |
"""Migrate the instances.""" |
|
411 |
|
|
412 |
for instance in self.instances: |
|
413 |
op = opcodes.OpMigrateInstance(instance_name=instance, live=True, |
|
414 |
cleanup=False) |
|
415 |
|
|
416 |
Log("- Migrate instance %s" % (instance)) |
|
417 |
self.ExecOp(op) |
|
418 |
for instance in self.instances: |
|
419 |
op = opcodes.OpMigrateInstance(instance_name=instance, live=True, |
|
420 |
cleanup=True) |
|
421 |
|
|
422 |
Log("- Testing 'migrate --cleanup' for instance %s" % (instance)) |
|
423 |
self.ExecOp(op) |
|
424 |
|
|
406 | 425 |
def ImportExport(self): |
407 | 426 |
"""Export the instance, delete it, and import it back. |
408 | 427 |
|
... | ... | |
671 | 690 |
if opts.do_failover and opts.disk_template in constants.DTS_NET_MIRROR: |
672 | 691 |
self.Failover() |
673 | 692 |
|
693 |
if opts.do_migrate and opts.disk_template == constants.DT_DRBD8: |
|
694 |
self.Migrate() |
|
695 |
|
|
674 | 696 |
if (opts.do_importexport and |
675 | 697 |
opts.disk_template not in (constants.DT_DISKLESS, |
676 | 698 |
constants.DT_FILE)): |
Also available in: Unified diff