Skip to content

Conversation

@hqhq
Copy link
Contributor

@hqhq hqhq commented Jan 23, 2015

Cgroup resources are host dependent, they should be in hostConfig.

For backward compatibility, we just copy it to hostConfig, and leave it in
Config for now, so there is no regressions, but the right way to use this
throught json is to put it in HostConfig, like:
{
"Hostname": "",
...
"HostConfig": {
"Memory": 314572800,
...
}
}

Signed-off-by: Qiang Huang h.huangqiang@huawei.com

@hqhq
Copy link
Contributor Author

hqhq commented Jan 23, 2015

@crosbymichael @unclejack @LK4D4 please take a look at this one, once this is good to go, the movement for other options will on their way soon.

Changes for test cases will in subsequent PR, these changes won't made any test cases fail.

@LK4D4
Copy link
Contributor

LK4D4 commented Jan 23, 2015

@hqhq cool, thank you! But I think that this will be in 1.18 api version and we're now in sort of "code freeze"
@crosbymichael What should we do?

@crosbymichael
Copy link
Contributor

approach looks good to me. Maybe we should do all the fields in one PR so we get everything updated in one merge.

@SvenDowideit
Copy link
Contributor

and something in the release notes and API recent changes for those that were using the API.

@hqhq hqhq force-pushed the hq_move_resource_to_hostconfig branch from 76f2b44 to 931f6b7 Compare January 27, 2015 03:24
@hqhq hqhq changed the title move memory from Config to hostConfig move resource options from Config to hostConfig Jan 27, 2015
@hqhq
Copy link
Contributor Author

hqhq commented Jan 27, 2015

updated, add all resource option changes in this PR.

@SvenDowideit do you mean add something for docs/sources/release-notes.md?
Shouldn't this be changed when we really release a version? Or do I need to do something in this PR?

@SvenDowideit
Copy link
Contributor

I prefer to keep all related updates in one PR, that way they hit the repo together, and can't be forgotten. but tbh, I'm not sure what the process is.

so this PR is only about moving and renaming, and then #9536 adds better help?

in that case, Docs LGTM @fredlf @jamtur01

@jamtur01
Copy link
Contributor

Docs LGTM

@hqhq
Copy link
Contributor Author

hqhq commented Feb 5, 2015

ping @crosbymichael @LK4D4

@unclejack
Copy link
Contributor

@hqhq You've got to rebase the PR because it can't be merged.

@hqhq hqhq force-pushed the hq_move_resource_to_hostconfig branch from 931f6b7 to c1888c1 Compare February 6, 2015 01:10
@hqhq
Copy link
Contributor Author

hqhq commented Feb 6, 2015

@unclejack @crosbymichael @LK4D4
Rebased.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

obsoleted --> deprecated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@fredlf
Copy link
Contributor

fredlf commented Feb 10, 2015

A couple of copy-edits, otherwise docs LGTM.

@SvenDowideit
Copy link
Contributor

I presume these API changes need to move to the 1.18 API doc

@cpuguy83
Copy link
Member

Why are we changing the CLI flag?

@jessfraz
Copy link
Contributor

ping @ashahab-altiscale for the lxc template change

@ashahab-altiscale
Copy link
Contributor

@jfrazelle Thanks for letting me know. Can you start an lxc build on this?

@hqhq
Copy link
Contributor Author

hqhq commented Feb 14, 2015

@cpuguy83 Do you mean we change --cpuset to --cpuset-cpus?
Because it's a better name, cpuset is not only for cpuset.cpus, but also for cpuset.mems, I was about to add support for cpuset.mems, by then, the name --cpuset would not be properly.

@hqhq hqhq force-pushed the hq_move_resource_to_hostconfig branch from d70569f to cea4166 Compare February 15, 2015 09:34
@vbatts
Copy link
Contributor

vbatts commented Feb 19, 2015

LGTM

@jessfraz
Copy link
Contributor

LGTM just needs commits to be squashed :) and maybe @crosbymichael because he is very good at catching weird things in the configs

@hqhq hqhq mentioned this pull request Feb 25, 2015
@hqhq
Copy link
Contributor Author

hqhq commented Feb 25, 2015

Hi, sorry for the late, I'm not sure how these commits can be squashed any more, are you proposing to make all the changes in one commit?
I think it's better to do one thing in one commit, if you think it's better to take the whole movement as one thing, it's ok for me to squash it, just let me know what you think :)

@hqhq
Copy link
Contributor Author

hqhq commented Feb 26, 2015

Hi, this PR is depended by a lot of PRs, can we pick this up so we can move on?
@crosbymichael

@hqhq
Copy link
Contributor Author

hqhq commented Mar 3, 2015

ping.
@crosbymichael @jfrazelle @LK4D4

Cgroup resources are host dependent, they should be in hostConfig.

For backward compatibility, we just copy it to hostConfig, and leave it in
Config for now, so there is no regressions, but the right way to use this
throught json is to put it in HostConfig, like:
  {
      "Hostname": "",
      ...
      "HostConfig": {
	  "CpuShares": 512,
          "Memory": 314572800,
          ...
      }
  }

As we will add CpusetMems, CpusetCpus is definitely a better name, but some
users are already using Cpuset in their http APIs, we also make it compatible.

The main idea is keep using Cpuset in Config Struct, and make it has the same
value as CpusetCpus, but not always, some scenarios:
 - Users use --cpuset in docker command, it can setup cpuset.cpus and can
   get Cpuset field from docker inspect or other http API which will get
   config info.
 - Users use --cpuset-cpus in docker command, ditto.
 - Users use Cpuset field in their http APIs, ditto.
 - Users use CpusetCpus field in their http APIs, they won't get Cpuset field
   in Config info, because by then, they should already know what happens
   to Cpuset.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
@hqhq hqhq force-pushed the hq_move_resource_to_hostconfig branch from cea4166 to 837eec0 Compare March 11, 2015 02:22
@hqhq
Copy link
Contributor Author

hqhq commented Mar 11, 2015

@crosbymichael @jfrazelle @LK4D4 @cpuguy83
Rebased again, I squash all commits into one commit, hope that's what you want.

Please review this, it have been taken too long (more than 4 months since the original PR), a lot of cgroup improvement are depending on this one, hope we can make some progress soon. Thanks.

@hqhq
Copy link
Contributor Author

hqhq commented Mar 13, 2015

ping @LK4D4 @crosbymichael @jfrazelle

@icecrime
Copy link
Contributor

As far as I can tell, this PR has both code and docs LGTM, and the commits have been squashed as requested. Thanks for you patience @hqhq, I'm merging this hoping that nobody will have any objections.

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.