Revision 064c21f8 scripts/gnt-node
b/scripts/gnt-node | ||
---|---|---|
624 | 624 |
commands = { |
625 | 625 |
'add': ( |
626 | 626 |
AddNode, [ArgHost(min=1, max=1)], |
627 |
[DEBUG_OPT, SECONDARY_IP_OPT, READD_OPT, NOSSH_KEYCHECK_OPT],
|
|
627 |
[SECONDARY_IP_OPT, READD_OPT, NOSSH_KEYCHECK_OPT], |
|
628 | 628 |
"[-s ip] [--readd] [--no-ssh-key-check] <node_name>", |
629 | 629 |
"Add a node to the cluster"), |
630 | 630 |
'evacuate': ( |
631 | 631 |
EvacuateNode, ARGS_ONE_NODE, |
632 |
[DEBUG_OPT, FORCE_OPT, IALLOCATOR_OPT, NEW_SECONDARY_OPT],
|
|
632 |
[FORCE_OPT, IALLOCATOR_OPT, NEW_SECONDARY_OPT], |
|
633 | 633 |
"[-f] {-I <iallocator> | -n <dst>} <node>", |
634 | 634 |
"Relocate the secondary instances from a node" |
635 | 635 |
" to other nodes (only for instances with drbd disk template)"), |
636 | 636 |
'failover': ( |
637 |
FailoverNode, ARGS_ONE_NODE, |
|
638 |
[DEBUG_OPT, FORCE_OPT, IGNORE_CONSIST_OPT], |
|
637 |
FailoverNode, ARGS_ONE_NODE, [FORCE_OPT, IGNORE_CONSIST_OPT], |
|
639 | 638 |
"[-f] <node>", |
640 | 639 |
"Stops the primary instances on a node and start them on their" |
641 | 640 |
" secondary node (only for instances with drbd disk template)"), |
642 | 641 |
'migrate': ( |
643 |
MigrateNode, ARGS_ONE_NODE, |
|
644 |
[DEBUG_OPT, FORCE_OPT, NONLIVE_OPT], |
|
642 |
MigrateNode, ARGS_ONE_NODE, [FORCE_OPT, NONLIVE_OPT], |
|
645 | 643 |
"[-f] <node>", |
646 | 644 |
"Migrate all the primary instance on a node away from it" |
647 | 645 |
" (only for instances of type drbd)"), |
648 | 646 |
'info': ( |
649 |
ShowNodeConfig, ARGS_MANY_NODES, [DEBUG_OPT],
|
|
647 |
ShowNodeConfig, ARGS_MANY_NODES, [], |
|
650 | 648 |
"[<node_name>...]", "Show information about the node(s)"), |
651 | 649 |
'list': ( |
652 | 650 |
ListNodes, ARGS_MANY_NODES, |
653 |
[DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT, SYNC_OPT],
|
|
651 |
[NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT, SYNC_OPT], |
|
654 | 652 |
"[nodes...]", |
655 | 653 |
"Lists the nodes in the cluster. The available fields are (see the man" |
656 | 654 |
" page for details): %s. The default field list is (in order): %s." % |
657 | 655 |
(", ".join(_LIST_HEADERS), ", ".join(_LIST_DEF_FIELDS))), |
658 | 656 |
'modify': ( |
659 | 657 |
SetNodeParams, ARGS_ONE_NODE, |
660 |
[DEBUG_OPT, FORCE_OPT, SUBMIT_OPT, MC_OPT, DRAINED_OPT, OFFLINE_OPT],
|
|
658 |
[FORCE_OPT, SUBMIT_OPT, MC_OPT, DRAINED_OPT, OFFLINE_OPT], |
|
661 | 659 |
"<node_name>", "Alters the parameters of a node"), |
662 | 660 |
'powercycle': ( |
663 | 661 |
PowercycleNode, ARGS_ONE_NODE, |
664 |
[DEBUG_OPT, FORCE_OPT, CONFIRM_OPT],
|
|
662 |
[FORCE_OPT, CONFIRM_OPT], |
|
665 | 663 |
"<node_name>", "Tries to forcefully powercycle a node"), |
666 | 664 |
'remove': ( |
667 |
RemoveNode, ARGS_ONE_NODE, [DEBUG_OPT],
|
|
665 |
RemoveNode, ARGS_ONE_NODE, [], |
|
668 | 666 |
"<node_name>", "Removes a node from the cluster"), |
669 | 667 |
'volumes': ( |
670 | 668 |
ListVolumes, [ArgNode()], |
671 |
[DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT],
|
|
669 |
[NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT], |
|
672 | 670 |
"[<node_name>...]", "List logical volumes on node(s)"), |
673 | 671 |
'physical-volumes': ( |
674 | 672 |
ListPhysicalVolumes, ARGS_MANY_NODES, |
675 |
[DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, |
|
676 |
FIELDS_OPT, _STORAGE_TYPE_OPT], |
|
677 |
"[<node_name>...]", |
|
678 |
"List physical volumes on node(s)"), |
|
673 |
[NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT, _STORAGE_TYPE_OPT], |
|
674 |
"[<node_name>...]", "List physical volumes on node(s)"), |
|
679 | 675 |
'modify-volume': ( |
680 | 676 |
ModifyVolume, |
681 | 677 |
[ArgNode(min=1, max=1), |
682 | 678 |
ArgChoice(min=1, max=1, choices=_MODIFIABLE_STORAGE_TYPES), |
683 | 679 |
ArgFile(min=1, max=1)], |
684 |
[DEBUG_OPT, ALLOCATABLE_OPT], |
|
685 |
"<node_name> <storage_type> <name>", |
|
686 |
"Modify storage volume on a node"), |
|
680 |
[], |
|
681 |
"<node_name> <storage_type> <name>", "Modify storage volume on a node"), |
|
687 | 682 |
'repair-volume': ( |
688 | 683 |
RepairVolume, |
689 | 684 |
[ArgNode(min=1, max=1), |
690 | 685 |
ArgChoice(min=1, max=1, choices=_REPAIRABLE_STORAGE_TYPES), |
691 | 686 |
ArgFile(min=1, max=1)], |
692 |
[DEBUG_OPT],
|
|
687 |
[], |
|
693 | 688 |
"<node_name> <storage_type> <name>", |
694 | 689 |
"Repairs a storage volume on a node"), |
695 | 690 |
'list-tags': ( |
696 |
ListTags, ARGS_ONE_NODE, [DEBUG_OPT],
|
|
691 |
ListTags, ARGS_ONE_NODE, [], |
|
697 | 692 |
"<node_name>", "List the tags of the given node"), |
698 | 693 |
'add-tags': ( |
699 |
AddTags, [ArgNode(min=1, max=1), ArgUnknown()], |
|
700 |
[DEBUG_OPT, TAG_SRC_OPT], |
|
694 |
AddTags, [ArgNode(min=1, max=1), ArgUnknown()], [TAG_SRC_OPT], |
|
701 | 695 |
"<node_name> tag...", "Add tags to the given node"), |
702 | 696 |
'remove-tags': ( |
703 |
RemoveTags, [ArgNode(min=1, max=1), ArgUnknown()], |
|
704 |
[DEBUG_OPT, TAG_SRC_OPT], |
|
697 |
RemoveTags, [ArgNode(min=1, max=1), ArgUnknown()], [TAG_SRC_OPT], |
|
705 | 698 |
"<node_name> tag...", "Remove tags from the given node"), |
706 | 699 |
} |
707 | 700 |
|
Also available in: Unified diff