Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VM: Fix live migration #14696

Merged
merged 8 commits into from
Dec 19, 2024
Merged

Conversation

tomponline
Copy link
Member

@tomponline tomponline commented Dec 19, 2024

PR #14539 broke live migration in commit d734721

This is because when live migrating a VM, the VM's Start() function is called on the target side (so that live migration can occur) before the Location of the instance is updated in the DB. This in turn calls statusCode during the start process.

The change to the statusCode function meant that this returned an error status because the instance was in theory non-local, and that prevented the qemu process from being started.

This PR reverts the statusCode error change and moves that logic into the Render function.

Fixes #14679

Copy link
Contributor

@hamistao hamistao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this and apologies for introducing this regression. TIL more about live migration on LXD.

@tomponline tomponline merged commit 2b27096 into canonical:main Dec 19, 2024
25 checks passed
@tomponline tomponline deleted the tp-vm-migration-fix branch December 19, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests/vm-migration regression with latest/edge snap
2 participants