Revision 92cf62e3
b/lib/client/gnt_instance.py | ||
---|---|---|
877 | 877 |
op = opcodes.OpInstanceMove(instance_name=instance_name, |
878 | 878 |
target_node=opts.node, |
879 | 879 |
shutdown_timeout=opts.shutdown_timeout, |
880 |
ignore_consistency=opts.ignore_consistency) |
|
880 |
ignore_consistency=opts.ignore_consistency, |
|
881 |
ignore_ipolicy=opts.ignore_ipolicy) |
|
881 | 882 |
SubmitOrSend(op, opts, cl=cl) |
882 | 883 |
return 0 |
883 | 884 |
|
... | ... | |
1454 | 1455 |
"move": ( |
1455 | 1456 |
MoveInstance, ARGS_ONE_INSTANCE, |
1456 | 1457 |
[FORCE_OPT, SUBMIT_OPT, SINGLE_NODE_OPT, SHUTDOWN_TIMEOUT_OPT, |
1457 |
DRY_RUN_OPT, PRIORITY_OPT, IGNORE_CONSIST_OPT], |
|
1458 |
DRY_RUN_OPT, PRIORITY_OPT, IGNORE_CONSIST_OPT, IGNORE_IPOLICY_OPT],
|
|
1458 | 1459 |
"[-f] <instance>", "Move instance to an arbitrary node" |
1459 | 1460 |
" (only for instances of type file and lv)"), |
1460 | 1461 |
"info": ( |
b/lib/cmdlib.py | ||
---|---|---|
7449 | 7449 |
_CheckNodeOnline(self, target_node) |
7450 | 7450 |
_CheckNodeNotDrained(self, target_node) |
7451 | 7451 |
_CheckNodeVmCapable(self, target_node) |
7452 |
ipolicy = _CalculateGroupIPolicy(self.cfg.GetClusterInfo(), node.group) |
|
7453 |
_CheckTargetNodeIPolicy(self, ipolicy, instance, node, |
|
7454 |
ignore=self.op.ignore_ipolicy) |
|
7452 | 7455 |
|
7453 | 7456 |
if instance.admin_state == constants.ADMINST_UP: |
7454 | 7457 |
# check memory requirements on the secondary node |
b/lib/opcodes.py | ||
---|---|---|
1286 | 1286 |
OP_PARAMS = [ |
1287 | 1287 |
_PInstanceName, |
1288 | 1288 |
_PShutdownTimeout, |
1289 |
_PIgnoreIpolicy, |
|
1289 | 1290 |
("target_node", ht.NoDefault, ht.TNonEmptyString, "Target node"), |
1290 | 1291 |
_PIgnoreConsistency, |
1291 | 1292 |
] |
b/man/gnt-instance.rst | ||
---|---|---|
1487 | 1487 |
^^^^ |
1488 | 1488 |
|
1489 | 1489 |
**move** [-f] [--ignore-consistency] |
1490 |
[-n *node*] [--shutdown-timeout=*N*] [--submit] |
|
1490 |
[-n *node*] [--shutdown-timeout=*N*] [--submit] [--ignore-ipolicy]
|
|
1491 | 1491 |
{*instance*} |
1492 | 1492 |
|
1493 | 1493 |
Move will move the instance to an arbitrary node in the cluster. This |
... | ... | |
1510 | 1510 |
but not wait for its completion. The job ID will be shown so that it |
1511 | 1511 |
can be examined via **gnt-job info**. |
1512 | 1512 |
|
1513 |
If ``--ignore-ipolicy`` is given any instance policy violations occuring |
|
1514 |
during this operation are ignored. |
|
1515 |
|
|
1513 | 1516 |
Example:: |
1514 | 1517 |
|
1515 | 1518 |
# gnt-instance move -n node3.example.com instance1.example.com |
Also available in: Unified diff