Revision 65a77fab lib/client/gnt_node.py
b/lib/client/gnt_node.py | ||
---|---|---|
119 | 119 |
help=("Operate on the master node too" |
120 | 120 |
" (potentially DANGEROUS)")) |
121 | 121 |
|
122 |
OOB_TIMEOUT_OPT = cli_option("--oob-timeout", dest="oob_timeout", type="int", |
|
123 |
default=constants.OOB_TIMEOUT, |
|
124 |
help="Maximum time to wait for out-of-band helper") |
|
125 |
|
|
122 | 126 |
|
123 | 127 |
def ConvertStorageType(user_storage_type): |
124 | 128 |
"""Converts a user storage type to its internal name. |
... | ... | |
529 | 533 |
opcodelist.append(opcodes.OpOobCommand(node_names=nodes, |
530 | 534 |
command=oob_command, |
531 | 535 |
ignore_status=opts.ignore_status, |
532 |
force_master=opts.force_master)) |
|
536 |
force_master=opts.force_master, |
|
537 |
timeout=opts.oob_timeout)) |
|
533 | 538 |
|
534 | 539 |
cli.SetGenericOpcodeOpts(opcodelist, opts) |
535 | 540 |
|
... | ... | |
582 | 587 |
@return: the desired exit code |
583 | 588 |
|
584 | 589 |
""" |
585 |
op = opcodes.OpOobCommand(node_names=args, command=constants.OOB_HEALTH) |
|
590 |
op = opcodes.OpOobCommand(node_names=args, command=constants.OOB_HEALTH, |
|
591 |
timeout=opts.oob_timeout) |
|
586 | 592 |
result = SubmitOpCode(op, opts=opts) |
587 | 593 |
|
588 | 594 |
if opts.no_headers: |
... | ... | |
864 | 870 |
[ArgChoice(min=1, max=1, choices=_LIST_POWER_COMMANDS), |
865 | 871 |
ArgNode()], |
866 | 872 |
[SUBMIT_OPT, AUTO_PROMOTE_OPT, PRIORITY_OPT, IGNORE_STATUS_OPT, |
867 |
FORCE_MASTER_OPT, FORCE_OPT, NOHDR_OPT, SEP_OPT, ALL_OPT], |
|
873 |
FORCE_MASTER_OPT, FORCE_OPT, NOHDR_OPT, SEP_OPT, ALL_OPT, |
|
874 |
OOB_TIMEOUT_OPT], |
|
868 | 875 |
"on|off|cycle|status [nodes...]", |
869 | 876 |
"Change power state of node by calling out-of-band helper."), |
870 | 877 |
'remove': ( |
... | ... | |
908 | 915 |
"<node_name> tag...", "Remove tags from the given node"), |
909 | 916 |
"health": ( |
910 | 917 |
Health, ARGS_MANY_NODES, |
911 |
[NOHDR_OPT, SEP_OPT, SUBMIT_OPT, PRIORITY_OPT], |
|
918 |
[NOHDR_OPT, SEP_OPT, SUBMIT_OPT, PRIORITY_OPT, OOB_TIMEOUT_OPT],
|
|
912 | 919 |
"[<node_name>...]", "List health of node(s) using out-of-band"), |
913 | 920 |
} |
914 | 921 |
|
Also available in: Unified diff