Revision 064c21f8 scripts/gnt-cluster
b/scripts/gnt-cluster | ||
---|---|---|
597 | 597 |
commands = { |
598 | 598 |
'init': ( |
599 | 599 |
InitCluster, [ArgHost(min=1, max=1)], |
600 |
[DEBUG_OPT, BACKEND_OPT, CP_SIZE_OPT, ENABLED_HV_OPT, GLOBAL_FILEDIR_OPT,
|
|
600 |
[BACKEND_OPT, CP_SIZE_OPT, ENABLED_HV_OPT, GLOBAL_FILEDIR_OPT, |
|
601 | 601 |
HVLIST_OPT, MAC_PREFIX_OPT, MASTER_NETDEV_OPT, NIC_PARAMS_OPT, |
602 | 602 |
NOLVM_STORAGE_OPT, NOMODIFY_ETCHOSTS_OPT, SECONDARY_IP_OPT, VG_NAME_OPT], |
603 | 603 |
"[opts...] <cluster_name>", "Initialises a new cluster configuration"), |
604 | 604 |
'destroy': ( |
605 |
DestroyCluster, ARGS_NONE, |
|
606 |
[DEBUG_OPT, YES_DOIT_OPT], |
|
605 |
DestroyCluster, ARGS_NONE, [YES_DOIT_OPT], |
|
607 | 606 |
"", "Destroy cluster"), |
608 | 607 |
'rename': ( |
609 | 608 |
RenameCluster, [ArgHost(min=1, max=1)], |
610 |
[DEBUG_OPT, FORCE_OPT],
|
|
609 |
[FORCE_OPT], |
|
611 | 610 |
"<new_name>", |
612 | 611 |
"Renames the cluster"), |
613 | 612 |
'redist-conf': ( |
614 |
RedistributeConfig, ARGS_NONE, [DEBUG_OPT, SUBMIT_OPT],
|
|
613 |
RedistributeConfig, ARGS_NONE, [SUBMIT_OPT], |
|
615 | 614 |
"", "Forces a push of the configuration file and ssconf files" |
616 | 615 |
" to the nodes in the cluster"), |
617 | 616 |
'verify': ( |
618 | 617 |
VerifyCluster, ARGS_NONE, |
619 |
[DEBUG_OPT, VERBOSE_OPT, DEBUG_SIMERR_OPT, ERROR_CODES_OPT, NONPLUS1_OPT],
|
|
618 |
[VERBOSE_OPT, DEBUG_SIMERR_OPT, ERROR_CODES_OPT, NONPLUS1_OPT], |
|
620 | 619 |
"", "Does a check on the cluster configuration"), |
621 | 620 |
'verify-disks': ( |
622 |
VerifyDisks, ARGS_NONE, [DEBUG_OPT],
|
|
621 |
VerifyDisks, ARGS_NONE, [], |
|
623 | 622 |
"", "Does a check on the cluster disk status"), |
624 | 623 |
'repair-disk-sizes': ( |
625 |
RepairDiskSizes, ARGS_MANY_INSTANCES, [DEBUG_OPT],
|
|
624 |
RepairDiskSizes, ARGS_MANY_INSTANCES, [], |
|
626 | 625 |
"", "Updates mismatches in recorded disk sizes"), |
627 | 626 |
'masterfailover': ( |
628 |
MasterFailover, ARGS_NONE, [DEBUG_OPT, NOVOTING_OPT],
|
|
627 |
MasterFailover, ARGS_NONE, [NOVOTING_OPT], |
|
629 | 628 |
"", "Makes the current node the master"), |
630 | 629 |
'version': ( |
631 |
ShowClusterVersion, ARGS_NONE, [DEBUG_OPT],
|
|
630 |
ShowClusterVersion, ARGS_NONE, [], |
|
632 | 631 |
"", "Shows the cluster version"), |
633 | 632 |
'getmaster': ( |
634 |
ShowClusterMaster, ARGS_NONE, [DEBUG_OPT],
|
|
633 |
ShowClusterMaster, ARGS_NONE, [], |
|
635 | 634 |
"", "Shows the cluster master"), |
636 | 635 |
'copyfile': ( |
637 | 636 |
ClusterCopyFile, [ArgFile(min=1, max=1)], |
638 |
[DEBUG_OPT, NODE_LIST_OPT],
|
|
637 |
[NODE_LIST_OPT], |
|
639 | 638 |
"[-n node...] <filename>", "Copies a file to all (or only some) nodes"), |
640 | 639 |
'command': ( |
641 | 640 |
RunClusterCommand, [ArgCommand(min=1)], |
642 |
[DEBUG_OPT, NODE_LIST_OPT],
|
|
641 |
[NODE_LIST_OPT], |
|
643 | 642 |
"[-n node...] <command>", "Runs a command on all (or only some) nodes"), |
644 | 643 |
'info': ( |
645 |
ShowClusterConfig, ARGS_NONE, [DEBUG_OPT],
|
|
644 |
ShowClusterConfig, ARGS_NONE, [], |
|
646 | 645 |
"", "Show cluster configuration"), |
647 | 646 |
'list-tags': ( |
648 |
ListTags, ARGS_NONE, |
|
649 |
[DEBUG_OPT], "", "List the tags of the cluster"), |
|
647 |
ListTags, ARGS_NONE, [], "", "List the tags of the cluster"), |
|
650 | 648 |
'add-tags': ( |
651 |
AddTags, [ArgUnknown()], [DEBUG_OPT, TAG_SRC_OPT],
|
|
649 |
AddTags, [ArgUnknown()], [TAG_SRC_OPT], |
|
652 | 650 |
"tag...", "Add tags to the cluster"), |
653 | 651 |
'remove-tags': ( |
654 |
RemoveTags, [ArgUnknown()], [DEBUG_OPT, TAG_SRC_OPT],
|
|
652 |
RemoveTags, [ArgUnknown()], [TAG_SRC_OPT], |
|
655 | 653 |
"tag...", "Remove tags from the cluster"), |
656 | 654 |
'search-tags': ( |
657 | 655 |
SearchTags, [ArgUnknown(min=1, max=1)], |
658 |
[DEBUG_OPT], "", "Searches the tags on all objects on"
|
|
656 |
[], "", "Searches the tags on all objects on" |
|
659 | 657 |
" the cluster for a given pattern (regex)"), |
660 | 658 |
'queue': ( |
661 | 659 |
QueueOps, |
662 | 660 |
[ArgChoice(min=1, max=1, choices=["drain", "undrain", "info"])], |
663 |
[DEBUG_OPT], "drain|undrain|info", "Change queue properties"),
|
|
661 |
[], "drain|undrain|info", "Change queue properties"), |
|
664 | 662 |
'watcher': ( |
665 | 663 |
WatcherOps, |
666 | 664 |
[ArgChoice(min=1, max=1, choices=["pause", "continue", "info"]), |
667 | 665 |
ArgSuggest(min=0, max=1, choices=["30m", "1h", "4h"])], |
668 |
[DEBUG_OPT],
|
|
666 |
[], |
|
669 | 667 |
"{pause <timespec>|continue|info}", "Change watcher properties"), |
670 | 668 |
'modify': ( |
671 | 669 |
SetClusterParams, ARGS_NONE, |
672 |
[DEBUG_OPT, BACKEND_OPT, CP_SIZE_OPT, ENABLED_HV_OPT, HVLIST_OPT,
|
|
670 |
[BACKEND_OPT, CP_SIZE_OPT, ENABLED_HV_OPT, HVLIST_OPT, |
|
673 | 671 |
NIC_PARAMS_OPT, NOLVM_STORAGE_OPT, VG_NAME_OPT], |
674 | 672 |
"[opts...]", |
675 | 673 |
"Alters the parameters of the cluster"), |
Also available in: Unified diff