op = opcodes.OpInstanceMigrate(instance_name=instance_name, mode=mode,
cleanup=opts.cleanup, iallocator=iallocator,
target_node=target_node,
- allow_failover=opts.allow_failover)
+ allow_failover=opts.allow_failover,
+ ignore_ipolicy=opts.ignore_ipolicy)
SubmitOpCode(op, cl=cl, opts=opts)
return 0
"migrate": (
MigrateInstance, ARGS_ONE_INSTANCE,
[FORCE_OPT, NONLIVE_OPT, MIGRATION_MODE_OPT, CLEANUP_OPT, DRY_RUN_OPT,
- PRIORITY_OPT, DST_NODE_OPT, IALLOCATOR_OPT, ALLOW_FAILOVER_OPT],
+ PRIORITY_OPT, DST_NODE_OPT, IALLOCATOR_OPT, ALLOW_FAILOVER_OPT,
+ IGNORE_IPOLICY_OPT],
"[-f] <instance>", "Migrate instance to its secondary node"
" (only for mirrored instances)"),
"move": (
self._migrater = TLMigrateInstance(self, self.op.instance_name,
cleanup=self.op.cleanup,
failover=False,
- fallback=self.op.allow_failover)
+ fallback=self.op.allow_failover,
+ ignore_ipolicy=self.op.ignore_ipolicy)
self.tasklets = [self._migrater]
def DeclareLocks(self, level):
_PMigrationMode,
_PMigrationLive,
_PMigrationTargetNode,
+ _PIgnoreIpolicy,
("cleanup", False, ht.TBool,
"Whether a previously failed migration should be cleaned up"),
("iallocator", None, ht.TMaybeString,
**migrate** [-f] {--cleanup} {*instance*}
**migrate** [-f] [--allow-failover] [--non-live]
-[--migration-mode=live\|non-live] {*instance*}
+[--migration-mode=live\|non-live] [--ignore-ipolicy] {*instance*}
Migrate will move the instance to its secondary node without
shutdown. It only works for instances having the drbd8 disk template
instance is shut down). Please note that the fallback will not happen
during execution. If a migration fails during execution it still fails.
+If ``--ignore-ipolicy`` is given any instance policy violations occuring
+during this operation are ignored.
+
Example (and expected output)::
# gnt-instance migrate instance1