Commit 82a786d5 authored by Iustin Pop's avatar Iustin Pop
Browse files

Unify the “--ignore-consistency” option


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent ff00c1a7
...@@ -58,6 +58,7 @@ __all__ = [ ...@@ -58,6 +58,7 @@ __all__ = [
"HVOPTS_OPT", "HVOPTS_OPT",
"HYPERVISOR_OPT", "HYPERVISOR_OPT",
"IALLOCATOR_OPT", "IALLOCATOR_OPT",
"IGNORE_CONSIST_OPT",
"FORCE_OPT", "FORCE_OPT",
"NET_OPT", "NET_OPT",
"NOHDR_OPT", "NOHDR_OPT",
...@@ -560,6 +561,12 @@ OS_SIZE_OPT = cli_option("-s", "--os-size", dest="sd_size", ...@@ -560,6 +561,12 @@ OS_SIZE_OPT = cli_option("-s", "--os-size", dest="sd_size",
" given disk size, in MiB unless a suffix is used", " given disk size, in MiB unless a suffix is used",
default=None, type="unit", metavar="<size>") default=None, type="unit", metavar="<size>")
IGNORE_CONSIST_OPT = cli_option("--ignore-consistency",
dest="ignore_consistency",
action="store_true", default=False,
help="Ignore the consistency of the disks on"
" the secondary")
def _ParseArgs(argv, commands, aliases): def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments. """Parser for the command line arguments.
......
...@@ -1402,13 +1402,7 @@ commands = { ...@@ -1402,13 +1402,7 @@ commands = {
"[--show-cmd] <instance>", "[--show-cmd] <instance>",
"Opens a console on the specified instance"), "Opens a console on the specified instance"),
'failover': (FailoverInstance, ARGS_ONE_INSTANCE, 'failover': (FailoverInstance, ARGS_ONE_INSTANCE,
[DEBUG_OPT, FORCE_OPT, [DEBUG_OPT, FORCE_OPT, IGNORE_CONSIST_OPT, SUBMIT_OPT],
cli_option("--ignore-consistency", dest="ignore_consistency",
action="store_true", default=False,
help="Ignore the consistency of the disks on"
" the secondary"),
SUBMIT_OPT,
],
"[-f] <instance>", "[-f] <instance>",
"Stops the instance and starts it on the backup node, using" "Stops the instance and starts it on the backup node, using"
" the remote mirror (only for instances of type drbd)"), " the remote mirror (only for instances of type drbd)"),
......
...@@ -647,12 +647,7 @@ commands = { ...@@ -647,12 +647,7 @@ commands = {
"Relocate the secondary instances from a node" "Relocate the secondary instances from a node"
" to other nodes (only for instances with drbd disk template)"), " to other nodes (only for instances with drbd disk template)"),
'failover': (FailoverNode, ARGS_ONE_NODE, 'failover': (FailoverNode, ARGS_ONE_NODE,
[DEBUG_OPT, FORCE_OPT, [DEBUG_OPT, FORCE_OPT, IGNORE_CONSIST_OPT],
cli_option("--ignore-consistency", dest="ignore_consistency",
action="store_true", default=False,
help="Ignore the consistency of the disks on"
" the secondary"),
],
"[-f] <node>", "[-f] <node>",
"Stops the primary instances on a node and start them on their" "Stops the primary instances on a node and start them on their"
" secondary node (only for instances with drbd disk template)"), " secondary node (only for instances with drbd disk template)"),
......
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