Revision 4c61d894
b/lib/cli.py | ||
---|---|---|
45 | 45 |
# Command line options |
46 | 46 |
"ALLOCATABLE_OPT", |
47 | 47 |
"ALL_OPT", |
48 |
"AUTO_PROMOTE_OPT", |
|
48 | 49 |
"AUTO_REPLACE_OPT", |
49 | 50 |
"BACKEND_OPT", |
50 | 51 |
"CLEANUP_OPT", |
... | ... | |
708 | 709 |
help="Replace the disk(s) on the secondary" |
709 | 710 |
" node (only for the drbd template)") |
710 | 711 |
|
712 |
AUTO_PROMOTE_OPT = cli_option("--auto-promote", dest="auto_promote", |
|
713 |
default=False, action="store_true", |
|
714 |
help="Lock all nodes and auto-promote as needed" |
|
715 |
" to MC status") |
|
716 |
|
|
711 | 717 |
AUTO_REPLACE_OPT = cli_option("-a", "--auto", dest="auto", |
712 | 718 |
default=False, action="store_true", |
713 | 719 |
help="Automatically replace faulty disks" |
b/man/gnt-node.sgml | ||
---|---|---|
596 | 596 |
<arg>--master-candidate=<option>yes|no</option></arg> |
597 | 597 |
<arg>--drained=<option>yes|no</option></arg> |
598 | 598 |
<arg>--offline=<option>yes|no</option></arg> |
599 |
<arg>--auto-promote</arg> |
|
599 | 600 |
<arg choice="req"><replaceable>node</replaceable></arg> |
600 | 601 |
</cmdsynopsis> |
601 | 602 |
|
... | ... | |
610 | 611 |
</para> |
611 | 612 |
|
612 | 613 |
<para> |
613 |
In case a node is demoted from the master candidate role, but |
|
614 |
there are not enough new nodes for this case, the operation |
|
615 |
will be refused. To override this check, pass the |
|
616 |
<option>--force</option> option. |
|
614 |
In case a node is demoted from the master candidate role, the |
|
615 |
operation will be refused unless you pass |
|
616 |
the <option>--auto-promote</option> option. This option will |
|
617 |
cause the operation to lock all cluster nodes (thus it will |
|
618 |
not be able to run in parallel with most other jobs), but it |
|
619 |
allows automated maintenance of the cluster candidate pool. If |
|
620 |
locking all cluster node is too expensive, another option is |
|
621 |
to promote manually another node to master candidate before |
|
622 |
demoting the current one. |
|
617 | 623 |
</para> |
618 | 624 |
|
619 | 625 |
<para> |
b/scripts/gnt-node | ||
---|---|---|
635 | 635 |
master_candidate=candidate, |
636 | 636 |
offline=offline, |
637 | 637 |
drained=drained, |
638 |
force=opts.force) |
|
638 |
force=opts.force, |
|
639 |
auto_promote=opts.auto_promote) |
|
639 | 640 |
|
640 | 641 |
# even if here we process the result, we allow submit only |
641 | 642 |
result = SubmitOrSend(op, opts) |
... | ... | |
681 | 682 |
(utils.CommaJoin(_LIST_HEADERS), utils.CommaJoin(_LIST_DEF_FIELDS))), |
682 | 683 |
'modify': ( |
683 | 684 |
SetNodeParams, ARGS_ONE_NODE, |
684 |
[FORCE_OPT, SUBMIT_OPT, MC_OPT, DRAINED_OPT, OFFLINE_OPT], |
|
685 |
[FORCE_OPT, SUBMIT_OPT, MC_OPT, DRAINED_OPT, OFFLINE_OPT, |
|
686 |
AUTO_PROMOTE_OPT], |
|
685 | 687 |
"<node_name>", "Alters the parameters of a node"), |
686 | 688 |
'powercycle': ( |
687 | 689 |
PowercycleNode, ARGS_ONE_NODE, |
Also available in: Unified diff