Merge pull request #9158 from AkihiroSuda/reword-cri-disable_cgroup

This commit is contained in:
Fu Wei
2023-09-30 01:22:56 +08:00
committed by GitHub
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")
}
}