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

Workaround container self-stop race #14463

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MggMuggins
Copy link
Contributor

If an instance self-stops while statusCode() is waiting for getLxcState() to finish, statusCode() may return a stale instance state.

This PR is a workaround for the use-case in #13453 and significantly reduces the likelihood that statusCode returns a stale status.

In an ideal world, LXD would maintain a canonical cluster-wide view of instance state. This would allow making race-free decisions based on whether an instance is running or not. For example:

  • Project CPU/RAM limits could be enforced at instance start instead of at instance creation
  • Volumes with content-type block could be attached to more than one instance without security.shared; instance start could fail if another instance with any shared block volumes is already running.

@MggMuggins MggMuggins marked this pull request as ready for review November 14, 2024 04:26
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.

2 participants