Conversation
|
Note that this PR need docker-archive/libcontainer#441 to me merged, so right now we might get compile error on Docker, please ignore that and review the code and docs first. |
|
Please squash your commits |
|
@duglin I took Michael's PR(https://github.com/docker/docker/pull/9984/commits) as example, daemon side, client side, docs, etc. Thought that's more clearer. Anyway, I squash the first three patches into one, I think the last one should be separated. Hope that's what you want. |
bde61bb to
ebd8f96
Compare
|
ping, I don't know why Jenkins failed on set command, this is passed in my box. |
|
ping @jfrazelle can you help take a look at Jenkins? Failed at |
|
daemon/execdriver/native/driver.go:349: too many arguments in call to cont.Set |
|
@cpuguy83 this is not the error for now, docker-archive/libcontainer#441 has been merged so arguments should be right. From currently Jenkins output, I don't know why it failed :( |
|
This needs a rebase now. |
|
Rebased. |
api/client/set.go
Outdated
There was a problem hiding this comment.
Can you have this error elaborate a bit more, something like:
fmt.Fpritnf(cli.err, "Error trying to set properties of container (%s): %s\n", name, err )
There was a problem hiding this comment.
Updated and rebased, thanks.
|
design LGTM One question... I noticed that once you create a container with (or w/o) |
|
@duglin I think even we want to do that, it can only be one way trip, once you drop a capability, you can never add it back before the system is rebooted, that's restriction from kernel. |
docs/man/docker-set.1.md
Outdated
There was a problem hiding this comment.
The second sentence needs a rewrite. It's not very clear.
There was a problem hiding this comment.
Yes, it's not clear, and a bit redundant, I just get rid of it, do you have better suggestion?
Updated and rebased, thanks.
|
+1. Thanks for working on this feature @hqhq! |
|
I don't have any objections for this feature, but it needs broad approval. Ping @jfrazelle @crosbymichael @estesp @LK4D4 @icecrime @unclejack wdyt? |
|
@icecrime I don't get it.
I don't know how you discussed this but I only see approval for the design in this thread from maintainers, and the reasons you give are really not strong enough. Hope you can reconsider it or give more reason why this feature should not be provided by Docker. Thanks. |
|
Yes, I can see the usefulness of at the very least being able to tweak resource usages. Only thing I'm not happy about is that we have a |
|
I think what we are trying to avoid is the rabbit hole where then people Since this is really basic functionality we don't see why it can't be done On Friday, May 1, 2015, Brian Goff [email protected] wrote:
|
|
What if this was API only? Maybe a post to /containers//resources? |
|
I'm not a fan of doing stuff like "API only" things. I would interpret it as "we're going to support something but make it hard for you to get to it" (yea I know the API isn't hard, but its harder than the CLI). If we're going to support something I think we should fully support it and make it a first-class feature and easy to use. I think we should step back and not get bogged down in some of the technical side-issues. I think its important to first discuss, and decide, whether we want to support modifying an existing container's resource config properties via Docker? IMO, if these configuration knobs are available in the underlying infrastructure then its hard for me to see why we wouldn't offer them to our users. |
|
we can comment on this until the cows come home but my current belief is this is "feature creep" but that can be disproven in the future just like -f ;) |
|
|
|
my beloved -f :-) |
|
@jfrazelle One reason I use a more common command Also, the design purpose including change other configs beside resources. I agree that people always have all kinds of needs for a common command, like we are keep adding options for Anyway, comments can be forever, I agree with @duglin , let's get to the same page about whether we want to support modifying an existing container's properties via Docker (not only resource configs). |
|
Is it fair to say that #6323 should be closed if we are not going to support this? IMO since docker is the one setting up the cgroups why shouldn't it be the API we call to adjust them? |
|
+1 to @cpuguy83 Docker is there to make people's lives easier so they don't need to get under the covers for everything the need to do. If the functionality is there in the underlying infrastructure its odd to me that we would want to hide it, unless exposing it breaks things or hacks things up. |
|
@icecrime As we discussed in DockerCon, can we reopen this? Should we discussed how our approach should be or should I rebase first? |
|
Anyway I'll rebase it first, one change is that I would like to remove the restriction about |
|
@icecrime @crosbymichael @duglin I have updated PR, can you please take a look. I did forced update, but the code didn't change, is it because it's closed? |
|
@hqhq yes I believe github won't update it once the issue is closed. |
|
@hqhq
|
|
@icecrime @jfrazelle - Am trying to understand your suggestion of using --cgroup-parent to possbily change resource configs of a running container. Could you please provide an example to describe how this could be done ? The only way I can see to actually change the config. of a container that is already started is to directly write to the cgroup filesystem on the docker host. Thanks! |
|
@selvik: You will have to run a container with a |
|
@vishh Thanks a lot for the clarification. So this means that the proposed "docker set" command allows one to change resource configs of a running container but --cgroup parent cannot be used to do this. |
|
is the proposed SET command available then for a running contianer? |
|
the latest link is #15078 |
This PR add the new command set, which can setup or update configs of a container, right now it just used for set resource configs, such as memory, cpuset, etc.