1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/execdriver/lxc
Qiang Huang 837eec064d move resources from Config to HostConfig
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>
2015-03-11 09:31:18 +08:00
..
driver.go Setup user groups in lxc driver 2015-03-10 09:43:11 -07:00
info.go Rename runtime/* to daemon/* 2014-04-17 14:43:01 -07:00
info_test.go Rename runtime/* to daemon/* 2014-04-17 14:43:01 -07:00
init.go Restored removed docker init options 2015-02-24 16:59:04 +00:00
lxc_init_linux.go Execdriver implementation on new libcontainer API 2015-03-06 14:46:58 -08:00
lxc_init_unsupported.go LXC CAP ADD CAP DROP IN TEMPLATE 2014-12-05 23:08:22 +00:00
lxc_template.go move resources from Config to HostConfig 2015-03-11 09:31:18 +08:00
lxc_template_unit_test.go Execdriver implementation on new libcontainer API 2015-03-06 14:46:58 -08:00