Commit 12c3449a authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Replace disk template drbd8 with drbd where missing.

Reviewed-by: iustinp
parent 01b69ec5
...@@ -3375,12 +3375,12 @@ class LUReplaceDisks(LogicalUnit): ...@@ -3375,12 +3375,12 @@ class LUReplaceDisks(LogicalUnit):
self.op.mode = constants.REPLACE_DISK_SEC self.op.mode = constants.REPLACE_DISK_SEC
if self.op.mode == constants.REPLACE_DISK_ALL: if self.op.mode == constants.REPLACE_DISK_ALL:
raise errors.OpPrereqError("Template 'drbd8' only allows primary or" raise errors.OpPrereqError("Template 'drbd' only allows primary or"
" secondary disk replacement, not" " secondary disk replacement, not"
" both at once") " both at once")
elif self.op.mode == constants.REPLACE_DISK_PRI: elif self.op.mode == constants.REPLACE_DISK_PRI:
if remote_node is not None: if remote_node is not None:
raise errors.OpPrereqError("Template 'drbd8' does not allow changing" raise errors.OpPrereqError("Template 'drbd' does not allow changing"
" the secondary while doing a primary" " the secondary while doing a primary"
" node disk replacement") " node disk replacement")
self.tgt_node = instance.primary_node self.tgt_node = instance.primary_node
......
...@@ -781,11 +781,11 @@ commands = { ...@@ -781,11 +781,11 @@ commands = {
make_option("-p", "--on-primary", dest="on_primary", make_option("-p", "--on-primary", dest="on_primary",
default=False, action="store_true", default=False, action="store_true",
help=("Replace the disk(s) on the primary" help=("Replace the disk(s) on the primary"
" node (only for the drbd8 template)")), " node (only for the drbd template)")),
make_option("-s", "--on-secondary", dest="on_secondary", make_option("-s", "--on-secondary", dest="on_secondary",
default=False, action="store_true", default=False, action="store_true",
help=("Replace the disk(s) on the secondary" help=("Replace the disk(s) on the secondary"
" node (only for the drbd8 template)")), " node (only for the drbd template)")),
make_option("--disks", dest="disks", default=None, make_option("--disks", dest="disks", default=None,
help=("Comma-separated list of disks" help=("Comma-separated list of disks"
" to replace (e.g. sda) (optional," " to replace (e.g. sda) (optional,"
......
...@@ -121,10 +121,10 @@ class Burner(object): ...@@ -121,10 +121,10 @@ class Burner(object):
help="Skip instance failovers", action="store_false", help="Skip instance failovers", action="store_false",
default=True) default=True)
parser.add_option("-t", "--disk-template", dest="disk_template", parser.add_option("-t", "--disk-template", dest="disk_template",
choices=("remote_raid1", "drbd8"), choices=("remote_raid1", "drbd"),
default="remote_raid1", default="remote_raid1",
help="Template type for network mirroring (remote_raid1" help="Template type for network mirroring (remote_raid1"
" or drbd8) [remote_raid1]") " or drbd) [remote_raid1]")
parser.add_option("-n", "--nodes", dest="nodes", default="", parser.add_option("-n", "--nodes", dest="nodes", default="",
help="Comma separated list of nodes to perform" help="Comma separated list of nodes to perform"
" the burnin on (defaults to all nodes)") " the burnin on (defaults to all nodes)")
...@@ -133,17 +133,12 @@ class Burner(object): ...@@ -133,17 +133,12 @@ class Burner(object):
if len(args) < 1 or options.os is None: if len(args) < 1 or options.os is None:
Usage() Usage()
if options.disk_template == "plain": supported_disk_templates = (constants.DT_PLAIN, constants.DT_REMOTE_RAID1,
disk_template = constants.DT_PLAIN constants.DT_DRBD8)
elif options.disk_template == "remote_raid1": if options.disk_template not in supported_disk_templates:
disk_template = constants.DT_REMOTE_RAID1
elif options.disk_template == "drbd8":
disk_template = constants.DT_DRBD8
else:
Log("Unknown disk template '%s'" % options.disk_template) Log("Unknown disk template '%s'" % options.disk_template)
sys.exit(1) sys.exit(1)
options.disk_template = disk_template
self.opts = options self.opts = options
self.instances = args self.instances = args
......
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