Dynamic change cgroup support #3574#3604
Conversation
|
heya @kenshin54 can you please update the cli.rst document with the new cgroup command, and the api docs too? Also: (stolen from @crosbymichael) We just began requiring contributors to sign their commits following these rules: https://github.com/dotcloud/docker/blob/master/CONTRIBUTING.md#sign-your-work Each commit in your PR must be signed in the following format: Please rebase and sign each commit. |
|
@SvenDowideit OK, I will update document and sign the commits later. |
|
I have added the documentation and signed the commit. Please check it out. |
|
ping @crosbymichael |
|
@kenshin54 you seem to have not signed commit 258c9ec :) |
|
docs LGTM tho - I like more prose, but don't worry, we can add that if its needed :) |
|
This seems leaky to me as we probably shouldn't expose cgroups via the API for portability. @shykes @crosbymichael - thoughts. We probably actually want a resource/constraint API. Ignoring the API design - please note we already have a |
Docker-DCO-1.1-Signed-off-by: Jialin Tian <[email protected]> (github: kenshin54)
Remove unused comment. Docker-DCO-1.1-Signed-off-by: Jialin Tian <[email protected]> (github: kenshin54)
Attach AddLXCConfig method to container struct. Move IsInBytesSubsystem method to utils/utils.go. Docker-DCO-1.1-Signed-off-by: Jialin Tian <[email protected]> (github: kenshin54)
Docker-DCO-1.1-Signed-off-by: Jialin Tian <[email protected]> (github: kenshin54)
Docker-DCO-1.1-Signed-off-by: Jialin Tian <[email protected]> (github: kenshin54)
Docker-DCO-1.1-Signed-off-by: Jialin Tian <[email protected]> (github: kenshin54)
Remove api_params dependency. Move top level cgroup.go to server.go. Add UpdateConfig to execdriver interface to regenerate lxc config. Docker-DCO-1.1-Signed-off-by: Jialin Tian <[email protected]> (github: kenshin54)
Docker-DCO-1.1-Signed-off-by: Jialin Tian <[email protected]> (github: kenshin54)
Docker-DCO-1.1-Signed-off-by: Jialin Tian <[email protected]> (github: kenshin54)
Docker-DCO-1.1-Signed-off-by: Jialin Tian <[email protected]> (github: kenshin54)
|
Yeah exposing cgroups directly is too low-level, because that API is not stable across versions and distros of linux . We would be stuck with clients depending on different variations. As a start, how about exposing a dynamic version of the 2 cgroup-related options we already support: -m and -c ? For example the syntax could be: docker set = where could be "memory" or "cpu"? |
|
I am going to close this PR for now. Maybe we can open an issue if you are still wanting to implement this. Alot has changed since this PR was opened so it would probably be better to start fresh after we discuss design. Thanks. |
Add a "docker cgroup" command to read/write cgroup system on a container on the fly, and -w flag can persist change to config.lxc file.