diff --git a/lib/cmdlib.py b/lib/cmdlib.py index ff4fa147a4e0cbdc441189598af32e57acb941d0..cf44b603ec7cbdfbe47a8346803485fd863fd5ab 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -3375,12 +3375,12 @@ class LUReplaceDisks(LogicalUnit): self.op.mode = constants.REPLACE_DISK_SEC 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" " both at once") elif self.op.mode == constants.REPLACE_DISK_PRI: 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" " node disk replacement") self.tgt_node = instance.primary_node diff --git a/scripts/gnt-instance b/scripts/gnt-instance index aaa780935c93b1013996041d2fbfd108ad0bc655..323e09f59e6c637710870a4c5a81226a95e865f5 100755 --- a/scripts/gnt-instance +++ b/scripts/gnt-instance @@ -781,11 +781,11 @@ commands = { make_option("-p", "--on-primary", dest="on_primary", default=False, action="store_true", 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", default=False, action="store_true", 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, help=("Comma-separated list of disks" " to replace (e.g. sda) (optional," diff --git a/tools/burnin b/tools/burnin index a43caddad45728e9888a13388385af935e1d7521..2f2edc3554b9c0f88b1b5e2124d123331b36bb17 100755 --- a/tools/burnin +++ b/tools/burnin @@ -121,10 +121,10 @@ class Burner(object): help="Skip instance failovers", action="store_false", default=True) parser.add_option("-t", "--disk-template", dest="disk_template", - choices=("remote_raid1", "drbd8"), + choices=("remote_raid1", "drbd"), default="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="", help="Comma separated list of nodes to perform" " the burnin on (defaults to all nodes)") @@ -133,17 +133,12 @@ class Burner(object): if len(args) < 1 or options.os is None: Usage() - if options.disk_template == "plain": - disk_template = constants.DT_PLAIN - elif options.disk_template == "remote_raid1": - disk_template = constants.DT_REMOTE_RAID1 - elif options.disk_template == "drbd8": - disk_template = constants.DT_DRBD8 - else: + supported_disk_templates = (constants.DT_PLAIN, constants.DT_REMOTE_RAID1, + constants.DT_DRBD8) + if options.disk_template not in supported_disk_templates: Log("Unknown disk template '%s'" % options.disk_template) sys.exit(1) - options.disk_template = disk_template self.opts = options self.instances = args