Skip to content

Conversation

@neersighted
Copy link
Contributor

@neersighted neersighted commented Feb 10, 2023

This reverts commit 1acca8b.

As stated in the Godoc, this function is intended to check for presence of apparmor_parser. Changing this regressed the public API of containerd, and directly contradicts the way that this function is consumed inside of containerd itself:

This has lead to a number of painful regressions and attempted fixes in Moby:

While reverting this late into the life of 1.6 and at the start of the life of 1.7 is likely painful, I think this is ultimately the best path to take, as containerd is subject to the same failure to start containers with an AppArmor kernel when apparmor_parser is missing as Moby.

This reverts commit 1acca8b.

As stated in the Godoc, this function is intended to check for presence
of `apparmor_parser`. Changing this regressed the public API of
containerd, and directly contradicts the way that this function is
consumed inside of containerd itself:
* https://github.com/containerd/containerd/blob/fdfdc9bfc0f865a43c88171110615d1510fad3bc/pkg/apparmor/apparmor.go#L20
* https://github.com/containerd/containerd/blob/fdfdc9bfc0f865a43c88171110615d1510fad3bc/pkg/cri/sbserver/helpers_linux.go#L85
* https://github.com/containerd/containerd/blob/fdfdc9bfc0f865a43c88171110615d1510fad3bc/pkg/cri/server/helpers_linux.go#L144

This has lead to a number of painful regressions and attempted fixes in
Moby:
* moby/moby#44900
* moby/moby#44902
* moby/moby#44970

While reverting this late into the life of 1.6 and at the start of the
life of 1.7 is likely painful, I think this is ultimately the best path
to take, as containerd is subject to the same failure to start
containers with an AppArmor kernel when `apparmor_parser` is missing as
Moby.

Signed-off-by: Bjorn Neergaard <[email protected]>
@k8s-ci-robot
Copy link

Hi @neersighted. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@neersighted neersighted force-pushed the apparmor_parser_regression branch from 876cd2f to c58b2ae Compare February 10, 2023 17:21
Signed-off-by: Bjorn Neergaard <[email protected]>
@neersighted neersighted force-pushed the apparmor_parser_regression branch from c58b2ae to d33a43c Compare February 10, 2023 17:24
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@samuelkarp
Copy link
Member

/ok-to-test

@samuelkarp samuelkarp added this to the 1.7 milestone Feb 10, 2023
Copy link
Member

@dims dims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fuweid fuweid merged commit cf7b705 into containerd:main Feb 11, 2023
@fuweid fuweid added cherry-picked/1.6.x PR commits are cherry-picked into release/1.6 branch and removed cherry-pick/1.6.x labels Feb 11, 2023
@neersighted neersighted deleted the apparmor_parser_regression branch February 11, 2023 01:51
lmbarros added a commit to balena-os/balena-engine that referenced this pull request Aug 30, 2023
This commit updates balena-containerd to a new version in which we
cherry-picked the change from here: containerd/containerd#8086

This change avoids enabling AppArmor if the `/sbin/apparmor_parser`
binary is not found in the system.

Signed-off-by: Leandro Motta Barros <[email protected]>
Change-type: patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/1.6.x PR commits are cherry-picked into release/1.6 branch ok-to-test

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

10 participants