Skip to content

Commit 8ffb03d

Browse files
committed
cri: stop recommending disable_cgroup
Disabling cgroup is no longer needed since cgroup v2 Signed-off-by: Akihiro Suda <[email protected]>
1 parent c5ce2a5 commit 8ffb03d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

pkg/cri/sbserver/service_linux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ const networkAttachCount = 2
3535
// initPlatform handles linux specific initialization for the CRI service.
3636
func (c *criService) initPlatform() (err error) {
3737
if userns.RunningInUserNS() {
38-
if !(c.config.DisableCgroup && !c.apparmorEnabled() && c.config.RestrictOOMScoreAdj) {
39-
log.L.Warn("Running containerd in a user namespace typically requires disable_cgroup, disable_apparmor, restrict_oom_score_adj set to be true")
38+
if c.apparmorEnabled() || !c.config.RestrictOOMScoreAdj {
39+
log.L.Warn("Running CRI plugin in a user namespace typically requires disable_apparmor and restrict_oom_score_adj to be true")
4040
}
4141
}
4242

pkg/cri/server/service_linux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ const networkAttachCount = 2
3434
// initPlatform handles linux specific initialization for the CRI service.
3535
func (c *criService) initPlatform() (err error) {
3636
if userns.RunningInUserNS() {
37-
if !(c.config.DisableCgroup && !c.apparmorEnabled() && c.config.RestrictOOMScoreAdj) {
38-
log.L.Warn("Running containerd in a user namespace typically requires disable_cgroup, disable_apparmor, restrict_oom_score_adj set to be true")
37+
if c.apparmorEnabled() || !c.config.RestrictOOMScoreAdj {
38+
log.L.Warn("Running CRI plugin in a user namespace typically requires disable_apparmor and restrict_oom_score_adj to be true")
3939
}
4040
}
4141

0 commit comments

Comments
 (0)