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

lxd/instance/drivers: Check running status with InitPID for cgroups #12441

Merged

Conversation

monstermunchkin
Copy link
Contributor

Cgroup storage limits are not applied when the container starts up. That
is because IsRunning returns false during the container startup.

This commits fixes this issue by relying on InitPID instead of
IsRunning. The former will return a positive integer if the container
is running even if the container is not fully set up yet.

Fixes #12343

Cgroup storage limits are not applied when the container starts up. That
is because `IsRunning` returns `false` during the container startup.

This commits fixes this issue by relying on `InitPID` instead of
`IsRunning`. The former will return a positive integer if the container
is running even if the container is not fully set up yet.

Fixes canonical#12343

Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
@tomponline tomponline merged commit c9001a7 into canonical:main Oct 23, 2023
26 checks passed
@tomponline
Copy link
Member

Thanks!

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.

storage limits not working when first starting lxd service
2 participants