Commit 9fdc92fa authored by Guido Trotter's avatar Guido Trotter
Browse files

burnin: rename instances to same name

this (a) allows us to test renaming in burnin even if we don't have an
extra instance name and (b) is a valid operation, as it allows to "fix"
an instance who went name-astray
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarIustin Pop <>
parent 57fb6fcb
......@@ -171,6 +171,9 @@ OPTIONS = [
cli.cli_option("--no-reboot", dest="do_reboot",
help="Skip instance reboot", action="store_false",
cli.cli_option("--no-renamesame", dest="do_renamesame",
help="Skip instance rename to same name", action="store_false",
cli.cli_option("--reboot-types", dest="reboot_types",
help="Specify the reboot types", default=None),
cli.cli_option("--no-activate-disks", dest="do_activate_disks",
......@@ -870,6 +873,19 @@ class Burner(object):
self.ExecOrQueue(instance, ops)
def BurnRenameSame(self):
"""Rename the instances to their own name."""
Log("Renaming the instances to their own name")
for instance in self.instances:
Log("instance %s", instance, indent=1)
op1 = self.StopInstanceOp(instance)
op2 = self.RenameInstanceOp(instance, instance)
Log("rename to the same name", indent=2)
op4 = self.StartInstanceOp(instance)
self.ExecOrQueue(instance, [op1, op2, op4])
def BurnActivateDisks(self):
......@@ -1074,6 +1090,9 @@ class Burner(object):
if opts.do_reboot:
if opts.do_renamesame:
if opts.do_addremove_disks:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment