Commit 67f3ee87 authored by Hrvoje Ribicic's avatar Hrvoje Ribicic

Rename compression option in gnt-backup export

The gnt-backup export option --compress did not do what most would
expect upon seeing the name: compress the exported image. Instead, it
used compression to try and speed up the transfer of the image,
decompressing it prior to writing the file. To reduce confusion, this
patch renames the option to --transport-compression. The change can
still be done in 2.11 as this option was introduced in this version
only, and it is beneficial as it allows a proper --compress or
--image-compression option to be added at a later time.
Signed-off-by: default avatarHrvoje Ribicic <riba@google.com>
Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
parent 205d3309
......@@ -190,6 +190,7 @@ __all__ = [
"SHOWCMD_OPT",
"SHOW_MACHINE_OPT",
"COMPRESS_OPT",
"TRANSPORT_COMPRESSION_OPT",
"SHUTDOWN_TIMEOUT_OPT",
"SINGLE_NODE_OPT",
"SPECS_CPU_COUNT_OPT",
......@@ -1382,6 +1383,11 @@ COMPRESS_OPT = cli_option("--compress", dest="compress",
help="The compression mode to use",
choices=list(constants.IEC_ALL))
TRANSPORT_COMPRESSION_OPT = \
cli_option("--transport-compression", dest="transport_compression",
default=constants.IEC_NONE, choices=list(constants.IEC_ALL),
help="The compression mode to use during transport")
SHUTDOWN_TIMEOUT_OPT = cli_option("--shutdown-timeout",
dest="shutdown_timeout", type="int",
default=constants.DEFAULT_SHUTDOWN_TIMEOUT,
......
......@@ -92,7 +92,7 @@ def ExportInstance(opts, args):
op = opcodes.OpBackupExport(instance_name=args[0],
target_node=opts.node,
compress=opts.compress,
compress=opts.transport_compression,
shutdown=opts.shutdown,
shutdown_timeout=opts.shutdown_timeout,
remove_instance=opts.remove_instance,
......@@ -150,7 +150,7 @@ commands = {
"Lists all available fields for exports"),
"export": (
ExportInstance, ARGS_ONE_INSTANCE,
[FORCE_OPT, SINGLE_NODE_OPT, COMPRESS_OPT, NOSHUTDOWN_OPT,
[FORCE_OPT, SINGLE_NODE_OPT, TRANSPORT_COMPRESSION_OPT, NOSHUTDOWN_OPT,
SHUTDOWN_TIMEOUT_OPT, REMOVE_INSTANCE_OPT, IGNORE_REMOVE_FAILURES_OPT,
DRY_RUN_OPT, PRIORITY_OPT] + SUBMIT_OPTS,
"-n <target_node> [opts...] <name>",
......
......@@ -24,18 +24,19 @@ COMMANDS
EXPORT
~~~~~~
| **export** {-n *node*} [\--compress=*compression-mode*]
| **export** {-n *node*}
| [\--shutdown-timeout=*N*] [\--noshutdown] [\--remove-instance]
| [\--ignore-remove-failures] [\--submit] [\--print-job-id]
| [\--transport-compression=*compression-mode*]
| {*instance*}
Exports an instance to the target node. All the instance data and
its configuration will be exported under the
``@CUSTOM_EXPORT_DIR@/$instance`` directory on the target node.
The ``--compress`` option is used to specify which compression mode
is used for moves during the export. Valid values are 'none'
(the default) and 'gzip'.
The ``--transport-compression`` option is used to specify which
compression mode is used to try and speed up moves during the export.
Valid values are 'none' (the default) and 'gzip'.
The ``--shutdown-timeout`` is used to specify how much time to wait
before forcing the shutdown (xm destroy in xen, killing the kvm
......
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