Commit dd94e9f6 authored by René Nussbaumer's avatar René Nussbaumer

gnt-node modify: Adding --node-powered=yes|no

Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 0ecef64c
......@@ -108,6 +108,7 @@ __all__ = [
"NODE_PLACEMENT_OPT",
"NODEGROUP_OPT",
"NODE_PARAMS_OPT",
"NODE_POWERED_OPT",
"NODRBD_STORAGE_OPT",
"NOHDR_OPT",
"NOIPCHECK_OPT",
......
......@@ -680,7 +680,8 @@ def SetNodeParams(opts, args):
secondary_ip=opts.secondary_ip,
force=opts.force,
ndparams=opts.ndparams,
auto_promote=opts.auto_promote)
auto_promote=opts.auto_promote,
powered=opts.node_powered)
# even if here we process the result, we allow submit only
result = SubmitOrSend(op, opts)
......@@ -739,7 +740,8 @@ commands = {
SetNodeParams, ARGS_ONE_NODE,
[FORCE_OPT, SUBMIT_OPT, MC_OPT, DRAINED_OPT, OFFLINE_OPT,
CAPAB_MASTER_OPT, CAPAB_VM_OPT, SECONDARY_IP_OPT,
AUTO_PROMOTE_OPT, DRY_RUN_OPT, PRIORITY_OPT, NODE_PARAMS_OPT],
AUTO_PROMOTE_OPT, DRY_RUN_OPT, PRIORITY_OPT, NODE_PARAMS_OPT,
NODE_POWERED_OPT],
"<node_name>", "Alters the parameters of a node"),
'powercycle': (
PowercycleNode, ARGS_ONE_NODE,
......
......@@ -354,6 +354,7 @@ MODIFY
| [--master-capable=``yes|no``] [--vm-capable=``yes|no``] [--auto-promote]
| [-s *secondary_ip*]
| [--node-parameters *ndparams*]
| [--node-powered=``yes|no``]
| {*node*}
This command changes the role of the node. Each options takes
......@@ -361,6 +362,9 @@ either a literal yes or no, and only one option should be given as
yes. The meaning of the roles and flags are described in the
manpage **ganeti**(7).
``--node-powered`` can be used to modify state-of-record if it doesn't reflect
the reality anymore.
In case a node is demoted from the master candidate role, the
operation will be refused unless you pass the ``--auto-promote``
option. This option will cause the operation to lock all cluster nodes
......
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