op = opcodes.OpNodeMigrate(node_name=args[0], mode=mode,
iallocator=opts.iallocator,
- target_node=opts.dst_node)
+ target_node=opts.dst_node,
+ ignore_ipolicy=opts.ignore_ipolicy)
result = SubmitOpCode(op, cl=cl, opts=opts)
"migrate": (
MigrateNode, ARGS_ONE_NODE,
[FORCE_OPT, NONLIVE_OPT, MIGRATION_MODE_OPT, DST_NODE_OPT,
- IALLOCATOR_OPT, PRIORITY_OPT],
+ IALLOCATOR_OPT, PRIORITY_OPT, IGNORE_IPOLICY_OPT],
"[-f] <node>",
"Migrate all the primary instance on a node away from it"
" (only for instances of type drbd)"),
mode=self.op.mode,
live=self.op.live,
iallocator=self.op.iallocator,
- target_node=self.op.target_node)]
+ target_node=self.op.target_node,
+ ignore_ipolicy=self.op.ignore_ipolicy)]
for inst in _GetNodePrimaryInstances(self.cfg, self.op.node_name)
]
_PMigrationMode,
_PMigrationLive,
_PMigrationTargetNode,
+ _PIgnoreIpolicy,
("iallocator", None, ht.TMaybeString,
"Iallocator for deciding the target node for shared-storage instances"),
]
~~~~~~~
**migrate** [-f] [--non-live] [--migration-mode=live\|non-live]
-{*node*}
+[--ignore-ipolicy] {*node*}
This command will migrate all instances having the given node as
primary to their secondary nodes. This works only for instances
``--no-live`` and ``--migration-mode`` can be given to influence
the migration type.
+If ``--ignore-ipolicy`` is given any instance policy violations occuring
+during this operation are ignored.
+
Example::
# gnt-node migrate node1.example.com