Revision 885a0fc4
b/lib/cli.py | ||
---|---|---|
126 | 126 |
"NOSTART_OPT", |
127 | 127 |
"NOSSH_KEYCHECK_OPT", |
128 | 128 |
"NOVOTING_OPT", |
129 |
"NO_REMEMBER_OPT", |
|
129 | 130 |
"NWSYNC_OPT", |
130 | 131 |
"ON_PRIMARY_OPT", |
131 | 132 |
"ON_SECONDARY_OPT", |
... | ... | |
1149 | 1150 |
dest="node_powered", |
1150 | 1151 |
help="Specify if the SoR for node is powered") |
1151 | 1152 |
|
1153 |
NO_REMEMBER_OPT = cli_option("--no-remember", |
|
1154 |
dest="no_remember", |
|
1155 |
action="store_true", default=False, |
|
1156 |
help="Perform but do not record the change" |
|
1157 |
" in the configuration") |
|
1158 |
|
|
1152 | 1159 |
|
1153 | 1160 |
#: Options provided by all commands |
1154 | 1161 |
COMMON_OPTS = [DEBUG_OPT] |
b/lib/client/gnt_instance.py | ||
---|---|---|
692 | 692 |
""" |
693 | 693 |
op = opcodes.OpInstanceStartup(instance_name=name, |
694 | 694 |
force=opts.force, |
695 |
ignore_offline_nodes=opts.ignore_offline) |
|
695 |
ignore_offline_nodes=opts.ignore_offline, |
|
696 |
no_remember=opts.no_remember) |
|
696 | 697 |
# do not add these parameters to the opcode unless they're defined |
697 | 698 |
if opts.hvparams: |
698 | 699 |
op.hvparams = opts.hvparams |
... | ... | |
731 | 732 |
""" |
732 | 733 |
return opcodes.OpInstanceShutdown(instance_name=name, |
733 | 734 |
timeout=opts.timeout, |
734 |
ignore_offline_nodes=opts.ignore_offline) |
|
735 |
ignore_offline_nodes=opts.ignore_offline, |
|
736 |
no_remember=opts.no_remember) |
|
735 | 737 |
|
736 | 738 |
|
737 | 739 |
def ReplaceDisks(opts, args): |
... | ... | |
1457 | 1459 |
[m_node_opt, m_pri_node_opt, m_sec_node_opt, m_clust_opt, |
1458 | 1460 |
m_node_tags_opt, m_pri_node_tags_opt, m_sec_node_tags_opt, |
1459 | 1461 |
m_inst_tags_opt, m_inst_opt, m_force_multi, TIMEOUT_OPT, SUBMIT_OPT, |
1460 |
DRY_RUN_OPT, PRIORITY_OPT, IGNORE_OFFLINE_OPT], |
|
1462 |
DRY_RUN_OPT, PRIORITY_OPT, IGNORE_OFFLINE_OPT, NO_REMEMBER_OPT],
|
|
1461 | 1463 |
"<instance>", "Stops an instance"), |
1462 | 1464 |
'startup': ( |
1463 | 1465 |
GenericManyOps("startup", _StartupInstance), [ArgInstance()], |
1464 | 1466 |
[FORCE_OPT, m_force_multi, m_node_opt, m_pri_node_opt, m_sec_node_opt, |
1465 | 1467 |
m_node_tags_opt, m_pri_node_tags_opt, m_sec_node_tags_opt, |
1466 | 1468 |
m_inst_tags_opt, m_clust_opt, m_inst_opt, SUBMIT_OPT, HVOPTS_OPT, |
1467 |
BACKEND_OPT, DRY_RUN_OPT, PRIORITY_OPT, IGNORE_OFFLINE_OPT], |
|
1469 |
BACKEND_OPT, DRY_RUN_OPT, PRIORITY_OPT, IGNORE_OFFLINE_OPT, |
|
1470 |
NO_REMEMBER_OPT], |
|
1468 | 1471 |
"<instance>", "Starts an instance"), |
1469 | 1472 |
'reboot': ( |
1470 | 1473 |
GenericManyOps("reboot", _RebootInstance), [ArgInstance()], |
b/man/gnt-instance.rst | ||
---|---|---|
989 | 989 |
|
990 | 990 |
| **startup** |
991 | 991 |
| [--force] [--ignore-offline] |
992 |
| [--force-multiple] |
|
992 |
| [--force-multiple] [--no-remember]
|
|
993 | 993 |
| [--instance \| --node \| --primary \| --secondary \| --all \| |
994 | 994 |
| --tags \| --node-tags \| --pri-node-tags \| --sec-node-tags] |
995 | 995 |
| [{-H|--hypervisor-parameters} ``key=value...``] |
... | ... | |
1047 | 1047 |
The ``--force-multiple`` will skip the interactive confirmation in the |
1048 | 1048 |
case the more than one instance will be affected. |
1049 | 1049 |
|
1050 |
The ``--no-remember`` option will perform the startup but not change |
|
1051 |
the state of the instance in the configuration file (if it was stopped |
|
1052 |
before, Ganeti will still thinks it needs to be stopped). This can be |
|
1053 |
used for testing, or for a one shot-start where you don't want the |
|
1054 |
watcher to restart the instance if it crashes. |
|
1055 |
|
|
1050 | 1056 |
The ``-H (--hypervisor-parameters)`` and ``-B (--backend-parameters)`` |
1051 | 1057 |
options specify temporary hypervisor and backend parameters that can |
1052 | 1058 |
be used to start an instance with modified parameters. They can be |
... | ... | |
1079 | 1085 |
|
1080 | 1086 |
| **shutdown** |
1081 | 1087 |
| [--timeout=*N*] |
1082 |
| [--force-multiple] [--ignore-offline] |
|
1088 |
| [--force-multiple] [--ignore-offline] [--no-remember]
|
|
1083 | 1089 |
| [--instance \| --node \| --primary \| --secondary \| --all \| |
1084 | 1090 |
| --tags \| --node-tags \| --pri-node-tags \| --sec-node-tags] |
1085 | 1091 |
| [--submit] |
... | ... | |
1108 | 1114 |
force the instance to be marked as stopped. This option should be used |
1109 | 1115 |
with care as it can lead to an inconsistent cluster state. |
1110 | 1116 |
|
1117 |
The ``--no-remember`` option will perform the shutdown but not change |
|
1118 |
the state of the instance in the configuration file (if it was running |
|
1119 |
before, Ganeti will still thinks it needs to be running). This can be |
|
1120 |
useful for a cluster-wide shutdown, where some instances are marked as |
|
1121 |
up and some as down, and you don't want to change the running state: |
|
1122 |
you just need to disable the watcher, shutdown all instances with |
|
1123 |
``--no-remember``, and when the watcher is activated again it will |
|
1124 |
restore the correct runtime state for all instances. |
|
1125 |
|
|
1111 | 1126 |
Example:: |
1112 | 1127 |
|
1113 | 1128 |
# gnt-instance shutdown instance1.example.com |
Also available in: Unified diff