- " the remote mirror (only for instances of type remote_raid1)"),
- 'info': (ShowInstanceConfig, ARGS_ANY, [DEBUG_OPT], "[<instance>...]",
- "Show information on the specified instance"),
- 'list': (ListInstances, ARGS_NONE,
- [DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT],
- "", "Lists the instances and their status"),
- 'reinstall': (ReinstallInstance, ARGS_ONE, [DEBUG_OPT, FORCE_OPT, os_opt],
- "[-f] <instance>", "Reinstall the instance"),
- 'remove': (RemoveInstance, ARGS_ONE, [DEBUG_OPT, FORCE_OPT],
+ " the remote mirror (only for instances of type drbd)"),
+ 'migrate': (MigrateInstance, ARGS_ONE,
+ [DEBUG_OPT, FORCE_OPT,
+ make_option("--non-live", dest="live",
+ default=True, action="store_false",
+ help="Do a non-live migration (this usually means"
+ " freeze the instance, save the state,"
+ " transfer and only then resume running on the"
+ " secondary node)"),
+ make_option("--cleanup", dest="cleanup",
+ default=False, action="store_true",
+ help="Instead of performing the migration, try to"
+ " recover from a failed cleanup. This is safe"
+ " to run even if the instance is healthy, but it"
+ " will create extra replication traffic and "
+ " disrupt briefly the replication (like during the"
+ " migration"),
+ ],
+ "[-f] <instance>",
+ "Migrate instance to its secondary node"
+ " (only for instances of type drbd)"),
+ 'info': (ShowInstanceConfig, ARGS_ANY,
+ [DEBUG_OPT,
+ make_option("-s", "--static", dest="static",
+ action="store_true", default=False,
+ help="Only show configuration data, not runtime data"),
+ make_option("--all", dest="show_all",
+ default=False, action="store_true",
+ help="Show info on all instances on the cluster."
+ " This can take a long time to run, use wisely."),
+ ], "[-s] {--all | <instance>...}",
+ "Show information on the specified instance(s)"),
+ 'list': (ListInstances, ARGS_ANY,
+ [DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT, SYNC_OPT],
+ "[<instance>...]",
+ "Lists the instances and their status. The available fields are"
+ " (see the man page for details): status, oper_state, oper_ram,"
+ " name, os, pnode, snodes, admin_state, admin_ram, disk_template,"
+ " ip, mac, bridge, sda_size, sdb_size, vcpus, serial_no,"
+ " hypervisor."
+ " The default field"
+ " list is (in order): %s." % ", ".join(_LIST_DEF_FIELDS),
+ ),
+ 'reinstall': (ReinstallInstance, ARGS_ANY,
+ [DEBUG_OPT, FORCE_OPT, os_opt,
+ m_force_multi,
+ m_node_opt, m_pri_node_opt, m_sec_node_opt,
+ m_clust_opt, m_inst_opt,
+ make_option("--select-os", dest="select_os",
+ action="store_true", default=False,
+ help="Interactive OS reinstall, lists available"
+ " OS templates for selection"),
+ SUBMIT_OPT,
+ ],
+ "[-f] <instance>", "Reinstall a stopped instance"),
+ 'remove': (RemoveInstance, ARGS_ONE,
+ [DEBUG_OPT, FORCE_OPT,
+ make_option("--ignore-failures", dest="ignore_failures",
+ action="store_true", default=False,
+ help=("Remove the instance from the cluster even"
+ " if there are failures during the removal"
+ " process (shutdown, disk removal, etc.)")),
+ SUBMIT_OPT,
+ ],