Skip to content

Commit c12225c

Browse files
authored
Merge pull request #9168 from AkihiroSuda/cherrypick-9158-1.7
[release/1.7] cri: stop recommending disable_cgroup
2 parents 790f6d9 + 6013b5e commit c12225c

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
@@ -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-
logrus.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+
logrus.Warn("Running CRI plugin in a user namespace typically requires disable_apparmor and restrict_oom_score_adj to be true")
3939
}
4040
}
4141

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-
logrus.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+
logrus.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)