Revision f8fa4175
b/lib/client/gnt_node.py | ||
---|---|---|
386 | 386 |
else: |
387 | 387 |
mode = opts.migration_mode |
388 | 388 |
op = opcodes.OpNodeMigrate(node_name=args[0], mode=mode, |
389 |
iallocator=opts.iallocator) |
|
389 |
iallocator=opts.iallocator, |
|
390 |
target_node=opts.dst_node) |
|
390 | 391 |
SubmitOpCode(op, cl=cl, opts=opts) |
391 | 392 |
|
392 | 393 |
|
... | ... | |
829 | 830 |
" secondary node (only for instances with drbd disk template)"), |
830 | 831 |
'migrate': ( |
831 | 832 |
MigrateNode, ARGS_ONE_NODE, |
832 |
[FORCE_OPT, NONLIVE_OPT, MIGRATION_MODE_OPT, |
|
833 |
[FORCE_OPT, NONLIVE_OPT, MIGRATION_MODE_OPT, DST_NODE_OPT,
|
|
833 | 834 |
IALLOCATOR_OPT, PRIORITY_OPT], |
834 | 835 |
"[-f] <node>", |
835 | 836 |
"Migrate all the primary instance on a node away from it" |
b/lib/cmdlib.py | ||
---|---|---|
6648 | 6648 |
REQ_BGL = False |
6649 | 6649 |
|
6650 | 6650 |
def CheckArguments(self): |
6651 |
_CheckIAllocatorOrNode(self, "iallocator", "remote_node")
|
|
6651 |
pass
|
|
6652 | 6652 |
|
6653 | 6653 |
def ExpandNames(self): |
6654 | 6654 |
self.op.node_name = _ExpandNodeName(self.cfg, self.op.node_name) |
b/lib/opcodes.py | ||
---|---|---|
118 | 118 |
_PNoRemember = ("no_remember", False, ht.TBool, |
119 | 119 |
"Do not remember the state change") |
120 | 120 |
|
121 |
#: Target node for instance migration/failover |
|
122 |
_PMigrationTargetNode = ("target_node", None, ht.TMaybeString, |
|
123 |
"Target node for shared-storage instances") |
|
124 |
|
|
121 | 125 |
#: OP_ID conversion regular expression |
122 | 126 |
_OPID_RE = re.compile("([a-z])([A-Z])") |
123 | 127 |
|
... | ... | |
874 | 878 |
_PNodeName, |
875 | 879 |
_PMigrationMode, |
876 | 880 |
_PMigrationLive, |
881 |
_PMigrationTargetNode, |
|
877 | 882 |
("iallocator", None, ht.TMaybeString, |
878 | 883 |
"Iallocator for deciding the target node for shared-storage instances"), |
879 | 884 |
] |
... | ... | |
1058 | 1063 |
_PInstanceName, |
1059 | 1064 |
_PShutdownTimeout, |
1060 | 1065 |
_PIgnoreConsistency, |
1066 |
_PMigrationTargetNode, |
|
1061 | 1067 |
("iallocator", None, ht.TMaybeString, |
1062 | 1068 |
"Iallocator for deciding the target node for shared-storage instances"), |
1063 |
("target_node", None, ht.TMaybeString, |
|
1064 |
"Target node for shared-storage instances"), |
|
1065 | 1069 |
] |
1066 | 1070 |
|
1067 | 1071 |
|
... | ... | |
1080 | 1084 |
_PInstanceName, |
1081 | 1085 |
_PMigrationMode, |
1082 | 1086 |
_PMigrationLive, |
1087 |
_PMigrationTargetNode, |
|
1083 | 1088 |
("cleanup", False, ht.TBool, |
1084 | 1089 |
"Whether a previously failed migration should be cleaned up"), |
1085 | 1090 |
("iallocator", None, ht.TMaybeString, |
1086 | 1091 |
"Iallocator for deciding the target node for shared-storage instances"), |
1087 |
("target_node", None, ht.TMaybeString, |
|
1088 |
"Target node for shared-storage instances"), |
|
1089 | 1092 |
("allow_failover", False, ht.TBool, |
1090 | 1093 |
"Whether we can fallback to failover if migration is not possible"), |
1091 | 1094 |
] |
Also available in: Unified diff