Commit bb851c63 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix a bug in LUInstanceMove



The opcode parameter ignore_consistency was used in the LU, but not
actually declared in the OpCode. The patch adds it in the opcode and
the command line client.

ObQuote — Please, please, can I have static typing?
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 4b9e8c93
......@@ -72,6 +72,9 @@ Many bug-fixes and a few new small features:
- Fixed the handling of a corner case when the Python installation gets
corrupted (e.g. a bad disk) while ganeti-noded is running and we try
to execute a command that doesn't exist
- Fixed a bug in ``gnt-instance move`` (LUInstanceMove) when the primary
node of the instance returned failures during instance shutdown; this
adds the option ``--ignore-consistency`` to gnt-instance move
And as usual, various improvements to the error messages, documentation
and man pages.
......
......@@ -883,7 +883,8 @@ def MoveInstance(opts, args):
op = opcodes.OpInstanceMove(instance_name=instance_name,
target_node=opts.node,
shutdown_timeout=opts.shutdown_timeout)
shutdown_timeout=opts.shutdown_timeout,
ignore_consistency=opts.ignore_consistency)
SubmitOrSend(op, opts, cl=cl)
return 0
......@@ -1399,7 +1400,7 @@ commands = {
'move': (
MoveInstance, ARGS_ONE_INSTANCE,
[FORCE_OPT, SUBMIT_OPT, SINGLE_NODE_OPT, SHUTDOWN_TIMEOUT_OPT,
DRY_RUN_OPT, PRIORITY_OPT],
DRY_RUN_OPT, PRIORITY_OPT, IGNORE_CONSIST_OPT],
"[-f] <instance>", "Move instance to an arbitrary node"
" (only for instances of type file and lv)"),
'info': (
......
......@@ -919,6 +919,7 @@ class OpInstanceMove(OpCode):
OP_PARAMS = [
_PInstanceName,
_PShutdownTimeout,
_PIgnoreConsistency,
("target_node", ht.NoDefault, ht.TNonEmptyString),
]
......
......@@ -1456,7 +1456,8 @@ Example (and expected output)::
MOVE
^^^^
**move** [-f] [-n *node*] [--shutdown-timeout=*N*] [--submit]
**move** [-f] [--ignore-consistency]
[-n *node*] [--shutdown-timeout=*N*] [--submit]
{*instance*}
Move will move the instance to an arbitrary node in the cluster. This
......@@ -1471,6 +1472,10 @@ before forcing the shutdown (e.g. ``xm destroy`` in XEN, killing the
kvm process for KVM, etc.). By default two minutes are given to each
instance to stop.
The ``--ignore-consistency`` option will make Ganeti ignore any errors
in trying to shutdown the instance on its node; useful if the
hypervisor is broken and you want to recuperate the data.
The ``--submit`` option is used to send the job to the master daemon
but not wait for its completion. The job ID will be shown so that it
can be examined via **gnt-job info**.
......
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