class documentation
class TLMigrateInstance(Tasklet):
Tasklet class for instance migration.
Method | __init__ |
Initializes this class. |
Method |
|
Check prerequisites. |
Method |
|
Perform the migration. |
Instance Variable | all |
Undocumented |
Instance Variable | allow |
Undocumented |
Instance Variable | cleanup |
Wheater we cleanup from a failed migration |
Instance Variable | current |
Undocumented |
Instance Variable | failover |
Whether operation results in failover or migration |
Instance Variable | fallback |
Whether fallback to failover is allowed if migration not possible |
Instance Variable | feedback |
Undocumented |
Instance Variable | iallocator |
The iallocator used to determine target_node |
Instance Variable | ignore |
Wheter we should ignore consistency between source and target node |
Instance Variable | ignore |
If true, accept incompatible hypervisor versions |
Instance Variable | ignore |
If true, we can ignore instance policy when migrating |
Instance Variable | instance |
Undocumented |
Instance Variable | instance |
Undocumented |
Instance Variable | instance |
Undocumented |
Instance Variable | live |
whether the migration will be done live or non-live; this variable is initalized only after CheckPrereq has run |
Instance Variable | migration |
Undocumented |
Instance Variable | nodes |
Undocumented |
Instance Variable | shutdown |
In case of failover timeout of the shutdown |
Instance Variable | source |
Undocumented |
Instance Variable | target |
If given, the target node UUID to reallocate the instance to |
Instance Variable | tgt |
Undocumented |
Method | _ |
Call the hypervisor code to abort a started migration. |
Method | _ |
Close instance disks. |
Method | _ |
Try to cleanup after a failed migration. |
Method | _ |
Failover an instance. |
Method | _ |
Migrate an instance. |
Method | _ |
Returns a list of nodes that have the given instance running |
Method | _ |
Reconnect to the network. |
Method | _ |
Disconnect from the network. |
Method | _ |
Open instance disks. |
Method | _ |
Try to revert the disk status after a failed migration. |
Method | _ |
Run the allocator based on input opcode. |
Method | _ |
Poll with custom rpc for disk sync. |
Constant | _MIGRATION |
Undocumented |
Constant | _MIGRATION |
Undocumented |
Inherited from Tasklet
:
Instance Variable | cfg |
Undocumented |
Instance Variable | lu |
Undocumented |
Instance Variable | rpc |
Undocumented |
def __init__(self, lu, instance_uuid, instance_name, cleanup, failover, fallback, ignore_consistency, allow_runtime_changes, shutdown_timeout, ignore_ipolicy, ignore_hvversions):
¶
overrides
ganeti.cmdlib.base.Tasklet.__init__
Initializes this class.
overrides
ganeti.cmdlib.base.Tasklet.CheckPrereq
Check prerequisites.
This checks that the instance is in the cluster.
live: boolean =
¶
whether the migration will be done live or non-live; this variable is initalized only after CheckPrereq has run
Try to cleanup after a failed migration.
The cleanup is done by:
- check that the instance is running only on one node
- try 'aborting' migration if it is running on two nodes
- update the config if needed
- change disks on its secondary node to secondary
- wait until disks are fully synchronized
- disconnect from the network
- change disks into single-master mode
- wait again until disks are fully synchronized
Failover an instance.
The failover is done by shutting it down on its present node and starting it on the secondary.
Migrate an instance.
The migrate is done by:
- change the disks into dual-master mode
- wait until disks are fully synchronized again
- migrate the instance
- change disks on the new secondary node (the old primary) to secondary
- wait until disks are fully synchronized
- change disks into single-master mode
Returns a list of nodes that have the given instance running
Parameters | |
name:string | instance name string to search for |
Returns | |
list of strings, node uuids |