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

Unable to update kmem limit only #1347

Closed
ghost opened this issue Feb 24, 2017 · 2 comments
Closed

Unable to update kmem limit only #1347

ghost opened this issue Feb 24, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 24, 2017

Due to commit 11222ee , it is not possible update item limit if not specified a default value in the config in the first place.

# runc update --kernel-memory 50331648 root
failed to set memory.kmem.limit_in_bytes, because either tasks have already joined this cgroup or it has children

However, it is fine to update other memory limits even if did not specify default values in the config.json.

# runc update --memory-reservation 50331648 root
# runc update --memory 50331648 root
# runc update --memory-swap 50331648 root

@crosbymichael PTAL

hqhq added a commit to hqhq/runc that referenced this issue Feb 25, 2017
Fixes: opencontainers#1347
Fixes: opencontainers#1083

The root cause of opencontainers#1083 is because we're joining an
existed cgroup whose kmem accouting is not initialized,
and it has child cgroup or tasks in it.

Fix it by checking if the cgroup is first time created,
and we should enable kmem accouting if the cgroup is
craeted by libcontainer with or without kmem limit
configed. Otherwise we'll get issue like opencontainers#1347

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
@hqhq
Copy link
Contributor

hqhq commented Feb 25, 2017

@qiancai Can you confirm if #1350 is gonna fix this?

@ghost
Copy link
Author

ghost commented Feb 27, 2017

Yes, it fixed the problem.

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

No branches or pull requests

1 participant