Revision 8c0b16f6
b/lib/cli.py | ||
---|---|---|
132 | 132 |
"NONICS_OPT", |
133 | 133 |
"NONLIVE_OPT", |
134 | 134 |
"NONPLUS1_OPT", |
135 |
"NORUNTIME_CHGS_OPT", |
|
135 | 136 |
"NOSHUTDOWN_OPT", |
136 | 137 |
"NOSTART_OPT", |
137 | 138 |
"NOSSH_KEYCHECK_OPT", |
... | ... | |
771 | 772 |
help="Do not install the OS (will" |
772 | 773 |
" enable no-start)") |
773 | 774 |
|
775 |
NORUNTIME_CHGS_OPT = cli_option("--no-runtime-changes", |
|
776 |
dest="allow_runtime_chgs", |
|
777 |
default=True, action="store_false", |
|
778 |
help="Don't allow runtime changes") |
|
779 |
|
|
774 | 780 |
BACKEND_OPT = cli_option("-B", "--backend-parameters", dest="beparams", |
775 | 781 |
type="keyval", default={}, |
776 | 782 |
help="Backend parameters") |
b/lib/client/gnt_instance.py | ||
---|---|---|
865 | 865 |
cleanup=opts.cleanup, iallocator=iallocator, |
866 | 866 |
target_node=target_node, |
867 | 867 |
allow_failover=opts.allow_failover, |
868 |
allow_runtime_changes=opts.allow_runtime_chgs, |
|
868 | 869 |
ignore_ipolicy=opts.ignore_ipolicy) |
869 | 870 |
SubmitOpCode(op, cl=cl, opts=opts) |
870 | 871 |
return 0 |
... | ... | |
1469 | 1470 |
MigrateInstance, ARGS_ONE_INSTANCE, |
1470 | 1471 |
[FORCE_OPT, NONLIVE_OPT, MIGRATION_MODE_OPT, CLEANUP_OPT, DRY_RUN_OPT, |
1471 | 1472 |
PRIORITY_OPT, DST_NODE_OPT, IALLOCATOR_OPT, ALLOW_FAILOVER_OPT, |
1472 |
IGNORE_IPOLICY_OPT], |
|
1473 |
IGNORE_IPOLICY_OPT, NORUNTIME_CHGS_OPT],
|
|
1473 | 1474 |
"[-f] <instance>", "Migrate instance to its secondary node" |
1474 | 1475 |
" (only for mirrored instances)"), |
1475 | 1476 |
"move": ( |
b/lib/client/gnt_node.py | ||
---|---|---|
427 | 427 |
op = opcodes.OpNodeMigrate(node_name=args[0], mode=mode, |
428 | 428 |
iallocator=opts.iallocator, |
429 | 429 |
target_node=opts.dst_node, |
430 |
allow_runtime_changes=opts.allow_runtime_chgs, |
|
430 | 431 |
ignore_ipolicy=opts.ignore_ipolicy) |
431 | 432 |
|
432 | 433 |
result = SubmitOpCode(op, cl=cl, opts=opts) |
... | ... | |
900 | 901 |
"migrate": ( |
901 | 902 |
MigrateNode, ARGS_ONE_NODE, |
902 | 903 |
[FORCE_OPT, NONLIVE_OPT, MIGRATION_MODE_OPT, DST_NODE_OPT, |
903 |
IALLOCATOR_OPT, PRIORITY_OPT, IGNORE_IPOLICY_OPT], |
|
904 |
IALLOCATOR_OPT, PRIORITY_OPT, IGNORE_IPOLICY_OPT, |
|
905 |
NORUNTIME_CHGS_OPT], |
|
904 | 906 |
"[-f] <node>", |
905 | 907 |
"Migrate all the primary instance on a node away from it" |
906 | 908 |
" (only for instances of type drbd)"), |
b/lib/opcodes.py | ||
---|---|---|
156 | 156 |
_PIgnoreIpolicy = ("ignore_ipolicy", False, ht.TBool, |
157 | 157 |
"Whether to ignore ipolicy violations") |
158 | 158 |
|
159 |
# Allow runtime changes while migrating |
|
160 |
_PAllowRuntimeChgs = ("allow_runtime_changes", True, ht.TBool, |
|
161 |
"Allow runtime changes (eg. memory ballooning)") |
|
162 |
|
|
163 |
|
|
159 | 164 |
#: OP_ID conversion regular expression |
160 | 165 |
_OPID_RE = re.compile("([a-z])([A-Z])") |
161 | 166 |
|
... | ... | |
1052 | 1057 |
_PMigrationMode, |
1053 | 1058 |
_PMigrationLive, |
1054 | 1059 |
_PMigrationTargetNode, |
1060 |
_PAllowRuntimeChgs, |
|
1055 | 1061 |
_PIgnoreIpolicy, |
1056 | 1062 |
("iallocator", None, ht.TMaybeString, |
1057 | 1063 |
"Iallocator for deciding the target node for shared-storage instances"), |
... | ... | |
1268 | 1274 |
_PMigrationMode, |
1269 | 1275 |
_PMigrationLive, |
1270 | 1276 |
_PMigrationTargetNode, |
1277 |
_PAllowRuntimeChgs, |
|
1271 | 1278 |
_PIgnoreIpolicy, |
1272 | 1279 |
("cleanup", False, ht.TBool, |
1273 | 1280 |
"Whether a previously failed migration should be cleaned up"), |
b/man/gnt-instance.rst | ||
---|---|---|
1442 | 1442 |
**migrate** [-f] {--cleanup} {*instance*} |
1443 | 1443 |
|
1444 | 1444 |
**migrate** [-f] [--allow-failover] [--non-live] |
1445 |
[--migration-mode=live\|non-live] [--ignore-ipolicy] {*instance*} |
|
1445 |
[--migration-mode=live\|non-live] [--ignore-ipolicy] |
|
1446 |
[--no-runtime-changes] {*instance*} |
|
1446 | 1447 |
|
1447 | 1448 |
Migrate will move the instance to its secondary node without |
1448 | 1449 |
shutdown. It only works for instances having the drbd8 disk template |
... | ... | |
1481 | 1482 |
If ``--ignore-ipolicy`` is given any instance policy violations occuring |
1482 | 1483 |
during this operation are ignored. |
1483 | 1484 |
|
1485 |
The ``--no-runtime-changes`` option forbids migrate to alter an |
|
1486 |
instance's runtime before migrating it (eg. ballooning an instance |
|
1487 |
down because the target node doesn't have enough available memory). |
|
1488 |
|
|
1484 | 1489 |
Example (and expected output):: |
1485 | 1490 |
|
1486 | 1491 |
# gnt-instance migrate instance1 |
b/man/gnt-node.rst | ||
---|---|---|
252 | 252 |
having a drbd disk template. |
253 | 253 |
|
254 | 254 |
As for the **gnt-instance migrate** command, the options |
255 |
``--no-live`` and ``--migration-mode`` can be given to influence
|
|
256 |
the migration type. |
|
255 |
``--no-live``, ``--migration-mode`` and ``--no-runtime-changes``
|
|
256 |
can be given to influence the migration type.
|
|
257 | 257 |
|
258 | 258 |
If ``--ignore-ipolicy`` is given any instance policy violations occuring |
259 | 259 |
during this operation are ignored. |
Also available in: Unified diff