Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add pre-copy migration support to LXD #4072
These patches add pre-copy migration support to LXD. These patches are using the existing pre-copy migration support in LXC (LXC needs the following patches lxc/lxc#1950).
Pre-copy migration is based on CRIU and CRIU uses the kernel's dirty memory tracking support:
The pre-copy migration support defaults to off for now as there is no way to query LXC if the architecture/kernel/criu combination support dirty memory tracking. There have been discussion in adding the necessary feature checking to LXC but it is not yet implemented.
If pre-copy migration should be used it is necessary to set 'migration.pre_copy.enabled' to 'true'.
LXD will query if the destination supports pre-copy migration and only then it will start to do multiple pre-copy migration steps. The number of pre-copy iterations can be controlled with 'migration.pre_copy.max' and defaults to 10.
To avoid to do unnecessary pre-copy iterations one more parameter was introduced. With 'migration.pre_copy.pre_migrated_pages' the percentage (defaults to 70%) of pre-copied pages can be controlled if more than 'migration.pre_copy.pre_migrated_pages' have been transferred by the last pre-dump, pre-dumping will stop earlier even if 'migration.pre_copy.max' has not been reached.
This provides the user with two options to control the number of pre-copy migration steps.
This pull request didn't trigger Jenkins as its author isn't in the whitelist.
An organization member must perform one of the following:
Those commands are simple Github comments of the format: "jenkins: COMMAND"