diff --git a/man/gnt-instance.sgml b/man/gnt-instance.sgml index dd88052bd382817e3900d4afb548834f48c08fb3..60d83158bf0a9d293fbbd26f2dc9fa0c33f092ab 100644 --- a/man/gnt-instance.sgml +++ b/man/gnt-instance.sgml @@ -1633,8 +1633,7 @@ instance5: 11225 are selected (either by passing multiple arguments or by using the <option>--node</option>, <option>--primary</option>, <option>--secondary</option> or - <option>--all</option> options), the user must pass both the - <option>--force</option> and + <option>--all</option> options), the user must pass the <option>--force-multiple</option> options to skip the interactive confirmation. </para> diff --git a/scripts/gnt-instance b/scripts/gnt-instance index ec19602cab7355b5141e5d9a0a59d9e37ffa3e56..75ecd63e8135338ceea82c7973f410070271d143 100755 --- a/scripts/gnt-instance +++ b/scripts/gnt-instance @@ -559,16 +559,17 @@ def ReinstallInstance(opts, args): else: os_name = opts.os - # third, get confirmation: multi-reinstall requires --force-multi - # *and* --force, single-reinstall just --force + # third, get confirmation: multi-reinstall requires --force-multi, + # single-reinstall either --force or --force-multi (--force-multi is + # a stronger --force) multi_on = opts.multi_mode != _SHUTDOWN_INSTANCES or len(inames) > 1 if multi_on: warn_msg = "Note: this will remove *all* data for the below instances!\n" - if not ((opts.force_multi and opts.force) or + if not (opts.force_multi or _ConfirmOperation(inames, "reinstall", extra=warn_msg)): return 1 else: - if not opts.force: + if not (opts.force or opts.force_multi): usertext = ("This will reinstall the instance %s and remove" " all data. Continue?") % inames[0] if not AskUser(usertext):