Revision 3438e1f8
b/lib/cli.py | ||
---|---|---|
122 | 122 |
"NEW_CLUSTER_DOMAIN_SECRET_OPT", |
123 | 123 |
"NEW_CONFD_HMAC_KEY_OPT", |
124 | 124 |
"NEW_RAPI_CERT_OPT", |
125 |
"NEW_PRIMARY_OPT", |
|
125 | 126 |
"NEW_SECONDARY_OPT", |
126 | 127 |
"NEW_SPICE_CERT_OPT", |
127 | 128 |
"NIC_PARAMS_OPT", |
... | ... | |
1067 | 1068 |
metavar="NODE", default=None, |
1068 | 1069 |
completion_suggest=OPT_COMPL_ONE_NODE) |
1069 | 1070 |
|
1071 |
NEW_PRIMARY_OPT = cli_option("--new-primary", dest="new_primary_node", |
|
1072 |
help="Specifies the new primary node", |
|
1073 |
metavar="<node>", default=None, |
|
1074 |
completion_suggest=OPT_COMPL_ONE_NODE) |
|
1075 |
|
|
1070 | 1076 |
ON_PRIMARY_OPT = cli_option("-p", "--on-primary", dest="on_primary", |
1071 | 1077 |
default=False, action="store_true", |
1072 | 1078 |
help="Replace the disk(s) on the primary" |
b/lib/client/gnt_instance.py | ||
---|---|---|
1294 | 1294 |
""" |
1295 | 1295 |
if not (opts.nics or opts.disks or opts.disk_template or |
1296 | 1296 |
opts.hvparams or opts.beparams or opts.os or opts.osparams or |
1297 |
opts.offline_inst or opts.online_inst or opts.runtime_mem): |
|
1297 |
opts.offline_inst or opts.online_inst or opts.runtime_mem or |
|
1298 |
opts.new_primary_node): |
|
1298 | 1299 |
ToStderr("Please give at least one of the parameters.") |
1299 | 1300 |
return 1 |
1300 | 1301 |
|
... | ... | |
1336 | 1337 |
disks=disks, |
1337 | 1338 |
disk_template=opts.disk_template, |
1338 | 1339 |
remote_node=opts.node, |
1340 |
pnode=opts.new_primary_node, |
|
1339 | 1341 |
hvparams=opts.hvparams, |
1340 | 1342 |
beparams=opts.beparams, |
1341 | 1343 |
runtime_mem=opts.runtime_mem, |
... | ... | |
1536 | 1538 |
DISK_TEMPLATE_OPT, SINGLE_NODE_OPT, OS_OPT, FORCE_VARIANT_OPT, |
1537 | 1539 |
OSPARAMS_OPT, DRY_RUN_OPT, PRIORITY_OPT, NWSYNC_OPT, OFFLINE_INST_OPT, |
1538 | 1540 |
ONLINE_INST_OPT, IGNORE_IPOLICY_OPT, RUNTIME_MEM_OPT, |
1539 |
NOCONFLICTSCHECK_OPT], |
|
1541 |
NOCONFLICTSCHECK_OPT, NEW_PRIMARY_OPT],
|
|
1540 | 1542 |
"<instance>", "Alters the parameters of an instance"), |
1541 | 1543 |
"shutdown": ( |
1542 | 1544 |
GenericManyOps("shutdown", _ShutdownInstance), [ArgInstance()], |
b/man/gnt-instance.rst | ||
---|---|---|
1032 | 1032 |
| \--disk [*N*:]remove \| |
1033 | 1033 |
| \--disk *N*:mode=*MODE*] |
1034 | 1034 |
| [{-t|\--disk-template} plain | {-t|\--disk-template} drbd -n *new_secondary*] [\--no-wait-for-sync] |
1035 |
| [\--new-primary=*node*] |
|
1035 | 1036 |
| [\--os-type=*OS* [\--force-variant]] |
1036 | 1037 |
| [{-O|\--os-parameters} *param*=*value*... ] |
1037 | 1038 |
| [\--offline \| \--online] |
... | ... | |
1090 | 1091 |
``--force-variant`` is passed. An invalid OS will also be refused, |
1091 | 1092 |
unless the ``--force`` option is given. |
1092 | 1093 |
|
1094 |
The option ``--new-primary`` will set the new primary node of an instance |
|
1095 |
assuming the disks have already been moved manually. Unless the ``--force`` |
|
1096 |
option is given, it is verified that the instance is no longer running |
|
1097 |
on its current primary node. |
|
1098 |
|
|
1093 | 1099 |
The ``--online`` and ``--offline`` options are used to transition an |
1094 | 1100 |
instance into and out of the ``offline`` state. An instance can be |
1095 | 1101 |
turned offline only if it was previously down. The ``--online`` option |
Also available in: Unified diff