cgroups: Use only pod cgroup#1880
Conversation
8902750 to
848f91d
Compare
62224f5 to
3c57d9b
Compare
|
/test |
1 similar comment
|
/test |
Codecov Report
@@ Coverage Diff @@
## master #1880 +/- ##
=========================================
Coverage ? 52.32%
=========================================
Files ? 108
Lines ? 14025
Branches ? 0
=========================================
Hits ? 7338
Misses ? 5813
Partials ? 874 |
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #1880 +/- ##
=========================================
Coverage ? 52.32%
=========================================
Files ? 108
Lines ? 14025
Branches ? 0
=========================================
Hits ? 7338
Misses ? 5813
Partials ? 874 |
Codecov Report
@@ Coverage Diff @@
## master #1880 +/- ##
==========================================
- Coverage 51.89% 51.71% -0.18%
==========================================
Files 107 107
Lines 14456 14589 +133
==========================================
+ Hits 7502 7545 +43
- Misses 6061 6140 +79
- Partials 893 904 +11 |
deb5cfe to
f2abb02
Compare
| } | ||
|
|
||
| // Use the parent cgroup of the container sandbox as the sandbox cgroup | ||
| s.state.CgroupPath = filepath.Dir(c.state.CgroupPath) + "/kata-sandbox/" |
There was a problem hiding this comment.
We are creating a cgroup, we should should remove it on delete (even if the caller will delete all the parent cgroup)
If we use a common name al the pods will use the same cgroup if the cgroup parent was not set just for the pod, e.g. docker. So probably need to add an additional sufix (container.id) or just drop kata in the parent cgroup instead of create one.
|
/test |
|
All passed with the flag not enabled. So all good in the default/current way to do cgroups. Re-ran with the flag enabled, fedora failed with (this job does not run docker) Restarting to get if is non related error. Ubuntu job failed with (this job does not run docker) The rest of jobs that failed with Expected as those run docker test |
- Add scripts to enable it if needed. - Add script to rolback config to enable it. - Check in docker test if option is enabled to not check cgroups in the host. Depends-on: github.com/kata-containers/runtime#1880 Fixes: kata-containers#1810 Signed-off-by: Jose Carlos Venegas Munoz <jcvenega@jcvenega-nuc.zpn.intel.com>
- Add scripts to enable it if needed. - Add script to rolback config to enable it. - Check in docker test if option is enabled to not check cgroups in the host. Depends-on: github.com/kata-containers/runtime#1880 Fixes: kata-containers#1810 Signed-off-by: Jose Carlos Venegas Munoz <jcvenega@jcvenega-nuc.zpn.intel.com>
46b907e to
959e000
Compare
|
/test |
1 similar comment
|
/test |
0be8814 to
01ea989
Compare
|
/test |
1 similar comment
|
/test |
- Add scripts to enable it if needed. - Add script to rolback config to enable it. - Check in docker test if option is enabled to not check cgroups in the host. Depends-on: github.com/kata-containers/runtime#1880 Fixes: kata-containers#1810 Signed-off-by: Jose Carlos Venegas Munoz <jcvenega@jcvenega-nuc.zpn.intel.com>
|
/test |
f9ec4fb to
ce4d1dc
Compare
- Add scripts to enable it if needed. - Add script to rolback config to enable it. - Check in docker test if option is enabled to not check cgroups in the host. Depends-on: github.com/kata-containers/runtime#1880 Fixes: kata-containers#1810 Signed-off-by: Jose Carlos Venegas Munoz <jcvenega@jcvenega-nuc.zpn.intel.com>
|
/test |
|
@egernst please take a look to the last updates. |
prefix cgroup related methods with cgroups, make easy to group together in auto-generated docs. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Move sandbox related methods to its own file. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
rename to allow group in auto-generated docs. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
constrainHypervisor -> constrainHypervisorVCPUs Document and rename function. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Some errors propagate with printing showing a cgroup path. If for some reason this is empty is difficult to know looking at the logs. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
The container CgroupsPath is optional acording to OCI. If for some reason the runtime decide to not define one. just skip cgroup operations. This is going to be useful for upcoming, sandbox cgroup only cgroup managment feature. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
add option to eneable only pod cgroup (SandboxCgroupOnly) Depends-on: github.com/kata-containers/tests#1824 Fixes: kata-containers#1879 Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
No call cgroup operations for containers in host if SandboxCgroupOnly is enabled. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
When a new sandbox is created, join to its cgroup path this will create all proxy, shim, etc in the sandbox cgroup. Fixes: kata-containers#1879 Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Add containers does not need to check the cgroup path this is done in a different function Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Use all subsystems for SandboxOnly option to make sure all cgroups are deleted. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
8ba45f3 to
9fc7246
Compare
- Add scripts to enable it if needed. - Add script to rolback config to enable it. - Add ci Job case for pod cgroup - Run again kuberentes test with pod cgroup enabled for K8S_CONTAINERD_JOB - Check in docker test if option is enabled to not check cgroups in the host. Depends-on: github.com/kata-containers/runtime#1880 Fixes: kata-containers#1810 Signed-off-by: Jose Carlos Venegas Munoz <jcvenega@jcvenega-nuc.zpn.intel.com>
- Add scripts to enable it if needed. - Add script to rolback config to enable it. - Add ci Job case for pod cgroup - Run again kuberentes test with pod cgroup enabled for K8S_CONTAINERD_JOB - Check in docker test if option is enabled to not check cgroups in the host. Depends-on: github.com/kata-containers/runtime#1880 Fixes: kata-containers#1810 Signed-off-by: Jose Carlos Venegas Munoz <jcvenega@jcvenega-nuc.zpn.intel.com>
- Add scripts to enable it if needed. - Add script to rolback config to enable it. - Add ci Job case for pod cgroup - Run again kuberentes test with pod cgroup enabled for K8S_CONTAINERD_JOB - Check in docker test if option is enabled to not check cgroups in the host. Depends-on: github.com/kata-containers/runtime#1880 Fixes: kata-containers#1810 Signed-off-by: Jose Carlos Venegas Munoz <jcvenega@jcvenega-nuc.zpn.intel.com>
- Add scripts to enable it if needed. - Add script to rolback config to enable it. - Add ci Job case for pod cgroup - Run again kuberentes test with pod cgroup enabled for K8S_CONTAINERD_JOB - Check in docker test if option is enabled to not check cgroups in the host. Depends-on: github.com/kata-containers/runtime#1880 Fixes: kata-containers#1810 Signed-off-by: Jose Carlos Venegas Munoz <jcvenega@jcvenega-nuc.zpn.intel.com>
- Add scripts to enable it if needed. - Add script to rolback config to enable it. - Add ci Job case for pod cgroup - Run again kuberentes test with pod cgroup enabled for K8S_CONTAINERD_JOB - Check in docker test if option is enabled to not check cgroups in the host. Depends-on: github.com/kata-containers/runtime#1880 Fixes: kata-containers#1810 Signed-off-by: Jose Carlos Venegas Munoz <jcvenega@jcvenega-nuc.zpn.intel.com>
|
/test |
egernst
left a comment
There was a problem hiding this comment.
looking good. Submitted one more patch which I think simplifies things.
|
/test |
Simplify the tests and the code by combining the create and join functions into a single function. Signed-off-by: Eric Ernst <eric.ernst@intel.com>
bergwolf
left a comment
There was a problem hiding this comment.
LGTM. A side question how do we handle guest resource calculation w.r.t. podoverhead? I mean, if we allocate the requested cpu/memory based on container cpu/memory limits, and hand all of them to the guest and container process, there is actually no reserved resource of the kata components.
|
@bergwolf : the overhead is assumed to be just on host, we don’t size the VM any larger to account for it (today, anyway). So, the container sizing is the same as what is requested. Perhaps the default cpu/memory can be considered for this (recall that we start with a minimal cpu/memory, and then add in whatever is requested by the workload). |
SandboxCgroupOnly)SandboxContainerDepends-on: github.com/kata-containers/tests#1824
Fixes: #1879
Signed-off-by: Jose Carlos Venegas Munoz jose.carlos.venegas.munoz@intel.com