Skip to content

Dynamic change cgroup support #3574#3604

Closed
kenshin54 wants to merge 10 commits intomoby:masterfrom
dianping:change-cgroup-support
Closed

Dynamic change cgroup support #3574#3604
kenshin54 wants to merge 10 commits intomoby:masterfrom
dianping:change-cgroup-support

Conversation

@kenshin54
Copy link

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.

@SvenDowideit
Copy link
Contributor

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:
Docker-DCO-1.1-Signed-off-by: Joe Smith <[email protected]> (github: github_handle)

Please rebase and sign each commit.

@kenshin54
Copy link
Author

@SvenDowideit OK, I will update document and sign the commits later.

@kenshin54
Copy link
Author

Hi @SvenDowideit

I have added the documentation and signed the commit. Please check it out.

@kenshin54
Copy link
Author

ping @crosbymichael

@SvenDowideit
Copy link
Contributor

@kenshin54 you seem to have not signed commit 258c9ec :)

@SvenDowideit
Copy link
Contributor

docs LGTM tho - I like more prose, but don't worry, we can add that if its needed :)

@pnasrat
Copy link
Contributor

pnasrat commented Jan 19, 2014

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 cgroups package please use that rather than a new top level cgroups.go

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)
@shykes
Copy link
Contributor

shykes commented Mar 12, 2014

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"?

@crosbymichael
Copy link
Contributor

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.

@kenshin54 kenshin54 deleted the change-cgroup-support branch June 24, 2014 02:23
@hqhq hqhq mentioned this pull request Apr 3, 2015
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.

5 participants