- 'add': (AddNode, ARGS_ONE,
- [DEBUG_OPT,
- make_option("-s", "--secondary-ip", dest="secondary_ip",
- help="Specify the secondary ip for the node",
- metavar="ADDRESS", default=None),],
- "[-s ip] <node_name>", "Add a node to the cluster"),
- 'evacuate': (EvacuateNode, ARGS_FIXED(2),
- [DEBUG_OPT, FORCE_OPT],
- "[-f] <src_node> <dst_node>",
- "Relocate the secondary instances from the first node"
- " to the second one (only for instances of type remote_raid1)"),
- 'failover': (FailoverNode, ARGS_ONE,
- [DEBUG_OPT, FORCE_OPT,
- make_option("--ignore-consistency", dest="ignore_consistency",
- action="store_true", default=False,
- help="Ignore the consistency of the disks on"
- " the secondary"),
- ],
- "[-f] <node>",
- "Stops the primary instances on a node and start them on their"
- " secondary node (only for instances of type remote_raid1)"),
- 'info': (ShowNodeConfig, ARGS_ANY, [DEBUG_OPT],
- "[<node_name>...]", "Show information about the node(s)"),
- 'list': (ListNodes, ARGS_NONE,
- [DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT],
- "", "Lists the nodes in the cluster"),
- 'remove': (RemoveNode, ARGS_ONE, [DEBUG_OPT],
- "<node_name>", "Removes a node from the cluster"),
- 'volumes': (ListVolumes, ARGS_ANY,
- [DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT],
- "[<node_name>...]", "List logical volumes on node(s)"),
- 'list-tags': (ListTags, ARGS_ONE, [DEBUG_OPT],
- "<node_name>", "List the tags of the given node"),
- 'add-tags': (AddTags, ARGS_ATLEAST(1), [DEBUG_OPT, TAG_SRC_OPT],
- "<node_name> tag...", "Add tags to the given node"),
- 'remove-tags': (RemoveTags, ARGS_ATLEAST(1), [DEBUG_OPT, TAG_SRC_OPT],
- "<node_name> tag...", "Remove tags from the given node"),
+ 'add': (
+ AddNode, [ArgHost(min=1, max=1)],
+ [SECONDARY_IP_OPT, READD_OPT, NOSSH_KEYCHECK_OPT],
+ "[-s ip] [--readd] [--no-ssh-key-check] <node_name>",
+ "Add a node to the cluster"),
+ 'evacuate': (
+ EvacuateNode, [ArgNode(min=1)],
+ [FORCE_OPT, IALLOCATOR_OPT, NEW_SECONDARY_OPT, EARLY_RELEASE_OPT],
+ "[-f] {-I <iallocator> | -n <dst>} <node>",
+ "Relocate the secondary instances from a node"
+ " to other nodes (only for instances with drbd disk template)"),
+ 'failover': (
+ FailoverNode, ARGS_ONE_NODE, [FORCE_OPT, IGNORE_CONSIST_OPT],
+ "[-f] <node>",
+ "Stops the primary instances on a node and start them on their"
+ " secondary node (only for instances with drbd disk template)"),
+ 'migrate': (
+ MigrateNode, ARGS_ONE_NODE, [FORCE_OPT, NONLIVE_OPT, MIGRATION_MODE_OPT],
+ "[-f] <node>",
+ "Migrate all the primary instance on a node away from it"
+ " (only for instances of type drbd)"),
+ 'info': (
+ ShowNodeConfig, ARGS_MANY_NODES, [],
+ "[<node_name>...]", "Show information about the node(s)"),
+ 'list': (
+ ListNodes, ARGS_MANY_NODES,
+ [NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT, SYNC_OPT, ROMAN_OPT],
+ "[nodes...]",
+ "Lists the nodes in the cluster. The available fields are (see the man"
+ " page for details): %s. The default field list is (in order): %s." %
+ (utils.CommaJoin(_LIST_HEADERS), utils.CommaJoin(_LIST_DEF_FIELDS))),
+ 'modify': (
+ SetNodeParams, ARGS_ONE_NODE,
+ [FORCE_OPT, SUBMIT_OPT, MC_OPT, DRAINED_OPT, OFFLINE_OPT,
+ AUTO_PROMOTE_OPT],
+ "<node_name>", "Alters the parameters of a node"),
+ 'powercycle': (
+ PowercycleNode, ARGS_ONE_NODE,
+ [FORCE_OPT, CONFIRM_OPT],
+ "<node_name>", "Tries to forcefully powercycle a node"),
+ 'remove': (
+ RemoveNode, ARGS_ONE_NODE, [],
+ "<node_name>", "Removes a node from the cluster"),
+ 'volumes': (
+ ListVolumes, [ArgNode()],
+ [NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT],
+ "[<node_name>...]", "List logical volumes on node(s)"),
+ 'list-storage': (
+ ListStorage, ARGS_MANY_NODES,
+ [NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT, _STORAGE_TYPE_OPT],
+ "[<node_name>...]", "List physical volumes on node(s). The available"
+ " fields are (see the man page for details): %s." %
+ (utils.CommaJoin(_LIST_STOR_HEADERS))),
+ 'modify-storage': (
+ ModifyStorage,
+ [ArgNode(min=1, max=1),
+ ArgChoice(min=1, max=1, choices=_MODIFIABLE_STORAGE_TYPES),
+ ArgFile(min=1, max=1)],
+ [ALLOCATABLE_OPT],
+ "<node_name> <storage_type> <name>", "Modify storage volume on a node"),
+ 'repair-storage': (
+ RepairStorage,
+ [ArgNode(min=1, max=1),
+ ArgChoice(min=1, max=1, choices=_REPAIRABLE_STORAGE_TYPES),
+ ArgFile(min=1, max=1)],
+ [IGNORE_CONSIST_OPT],
+ "<node_name> <storage_type> <name>",
+ "Repairs a storage volume on a node"),
+ 'list-tags': (
+ ListTags, ARGS_ONE_NODE, [],
+ "<node_name>", "List the tags of the given node"),
+ 'add-tags': (
+ AddTags, [ArgNode(min=1, max=1), ArgUnknown()], [TAG_SRC_OPT],
+ "<node_name> tag...", "Add tags to the given node"),
+ 'remove-tags': (
+ RemoveTags, [ArgNode(min=1, max=1), ArgUnknown()], [TAG_SRC_OPT],
+ "<node_name> tag...", "Remove tags from the given node"),