Commit f2a0828c authored by Iustin Pop's avatar Iustin Pop

Unify the “--non-live” option

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 82a786d5
......@@ -64,6 +64,7 @@ __all__ = [
"NOHDR_OPT",
"NOIPCHECK_OPT",
"NONICS_OPT",
"NONLIVE_OPT",
"NWSYNC_OPT",
"OS_OPT",
"OS_SIZE_OPT",
......@@ -567,6 +568,12 @@ IGNORE_CONSIST_OPT = cli_option("--ignore-consistency",
help="Ignore the consistency of the disks on"
" the secondary")
NONLIVE_OPT = cli_option("--non-live", dest="live",
default=True, action="store_false",
help="Do a non-live migration (this usually means"
" freeze the instance, save the state, transfer and"
" only then resume running on the secondary node)")
def _ParseArgs(argv, commands, aliases):
"""Parser for the command line arguments.
......
......@@ -1407,13 +1407,7 @@ commands = {
"Stops the instance and starts it on the backup node, using"
" the remote mirror (only for instances of type drbd)"),
'migrate': (MigrateInstance, ARGS_ONE_INSTANCE,
[DEBUG_OPT, FORCE_OPT,
cli_option("--non-live", dest="live",
default=True, action="store_false",
help="Do a non-live migration (this usually means"
" freeze the instance, save the state,"
" transfer and only then resume running on the"
" secondary node)"),
[DEBUG_OPT, FORCE_OPT, NONLIVE_OPT,
cli_option("--cleanup", dest="cleanup",
default=False, action="store_true",
help="Instead of performing the migration, try to"
......
......@@ -652,14 +652,7 @@ commands = {
"Stops the primary instances on a node and start them on their"
" secondary node (only for instances with drbd disk template)"),
'migrate': (MigrateNode, ARGS_ONE_NODE,
[DEBUG_OPT, FORCE_OPT,
cli_option("--non-live", dest="live",
default=True, action="store_false",
help="Do a non-live migration (this usually means"
" freeze the instance, save the state,"
" transfer and only then resume running on the"
" secondary node)"),
],
[DEBUG_OPT, FORCE_OPT, NONLIVE_OPT],
"[-f] <node>",
"Migrate all the primary instance on a node away from it"
" (only for instances of type drbd)"),
......
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