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

Make migration.stateful also apply to containers #682

Closed
stgraber opened this issue Mar 27, 2024 · 4 comments
Closed

Make migration.stateful also apply to containers #682

stgraber opened this issue Mar 27, 2024 · 4 comments
Assignees
Labels
Documentation Documentation needs updating Easy Good for new contributors Feature New feature, not a bug
Milestone

Comments

@stgraber
Copy link
Member

Containers should also require migration.stateful for live-migration, stateful stop and stateful snapshots.

This should make it less likely to have folks run into weird CRIU errors when all they wanted was copy a container to another system.

@stgraber stgraber added Documentation Documentation needs updating Feature New feature, not a bug Easy Good for new contributors labels Mar 27, 2024
@stgraber stgraber added this to the soon milestone Mar 27, 2024
@Abhiram824
Copy link
Contributor

Hello, could I be assigned to this issue as well?

@stgraber
Copy link
Member Author

So that one shouldn't be too difficult to sort out.

This will need a new API extension in doc/api-extensions.md and internal/version/api.go, let's call it container_migration_stateful.

Then you'll first need to modify internal/instance/config.go to move the config key migration.stateful from InstanceConfigKeysVM to InstanceConfigKeysAny and remove the condition on it`.

This will then require you run make update-metadata to re-generate our config key definitions.

Once that's done, you can start editing internal/server/instance/drivers/driver_lxc.go to add the checks for that configuration key.

You should require the config key is set to true (util.IsTrue) in:

  • Start() (when stateful is true)
  • Stop() (when stateful is true)
  • snapshot() (when stateful is true)

Commit list should look something like:

  • api: container_migration_stateful
  • internal/instance: Add migration.stateful to containers
  • incusd/instance/lxc: Add checks for migration.stateful

@dhruvvnistala
Copy link
Contributor

dhruvvnistala commented Apr 14, 2024

Hi, commenting on this post as per our discussion on #255

@Abhiram824
Copy link
Contributor

Hello, we made some progress and created a PR #781. Please let us know if everything looks okay.

stgraber pushed a commit to Abhiram824/incus that referenced this issue Apr 25, 2024
Closes lxc#682

Signed-off-by: Abhiram824 <abhisuhaas1@gmail.com>
@stgraber stgraber modified the milestones: soon, incus-6.1 Apr 30, 2024
stgraber pushed a commit that referenced this issue May 27, 2024
Closes #682

Signed-off-by: Abhiram824 <abhisuhaas1@gmail.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Documentation needs updating Easy Good for new contributors Feature New feature, not a bug
Development

No branches or pull requests

3 participants