cri: stop recommending disable_cgroup

Disabling cgroup is no longer needed since cgroup v2

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda 2023-09-29 05:19:43 +09:00
parent c5ce2a5f75
commit 8ffb03d689
No known key found for this signature in database
GPG Key ID: 49524C6F9F638F1A
2 changed files with 4 additions and 4 deletions

View File

@ -35,8 +35,8 @@ const networkAttachCount = 2
// initPlatform handles linux specific initialization for the CRI service.
func (c *criService) initPlatform() (err error) {
if userns.RunningInUserNS() {
if !(c.config.DisableCgroup && !c.apparmorEnabled() && c.config.RestrictOOMScoreAdj) {
log.L.Warn("Running containerd in a user namespace typically requires disable_cgroup, disable_apparmor, restrict_oom_score_adj set to be true")
if c.apparmorEnabled() || !c.config.RestrictOOMScoreAdj {
log.L.Warn("Running CRI plugin in a user namespace typically requires disable_apparmor and restrict_oom_score_adj to be true")
}
}

View File

@ -34,8 +34,8 @@ const networkAttachCount = 2
// initPlatform handles linux specific initialization for the CRI service.
func (c *criService) initPlatform() (err error) {
if userns.RunningInUserNS() {
if !(c.config.DisableCgroup && !c.apparmorEnabled() && c.config.RestrictOOMScoreAdj) {
log.L.Warn("Running containerd in a user namespace typically requires disable_cgroup, disable_apparmor, restrict_oom_score_adj set to be true")
if c.apparmorEnabled() || !c.config.RestrictOOMScoreAdj {
log.L.Warn("Running CRI plugin in a user namespace typically requires disable_apparmor and restrict_oom_score_adj to be true")
}
}