[release/1.7] apparmor: Set abi conditionally#13273
Merged
mxpv merged 1 commit intoApr 23, 2026
Merged
Conversation
The "abi" keyword was added for apparmor 3.0 The original change to add this ended up breaking versions < 3.0. The abi itself is a macro in /etc/apparmor.d so we can check if the macro exists to determine if we *can* set an abi in the template. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
cpuguy83
approved these changes
Apr 23, 2026
mxpv
approved these changes
Apr 23, 2026
ricolin
added a commit
to ricolin/ansible-collection-containers
that referenced
this pull request
Apr 28, 2026
containerd 1.7.31 unconditionally emits `abi <abi/3.0>,` as line 2 of its
default AppArmor profile template (see contrib/apparmor/template.go in
v1.7.31). Ubuntu 20.04 (focal) ships AppArmor 2.13.x which does not
understand the `abi <...>,` directive, so every container creation on
focal fails:
AppArmor parser error for /tmp/cri-containerd.apparmor.dXXX at line 2:
Could not open 'abi/3.0': No such file or directory
The regression has already been fixed upstream and backported to the
release/1.7 branch:
- containerd/containerd#13268
- containerd/containerd#13273
so 1.7.32 will work fine on focal again. Rather than hard-pinning focal
to 1.7.30 (which would also have to be bumped manually for every future
1.7.x release), this introduces a `containerd_focal_excluded_versions`
list and selects the latest 1.7.x that is **not** in it. Today that
yields 1.7.30; once 1.7.32 ships it will be picked up automatically and
this workaround can be dropped.
Note: v1.6.6 has already been released with the broken default, so we
intentionally do not rewrite history or roll back any deployments --
existing focal hosts that ended up on 1.7.31 will heal on their next
run once 1.7.32 lands (or by manually overriding
`containerd_focal_excluded_versions`).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ricolin
added a commit
to ricolin/ansible-collection-containers
that referenced
this pull request
Apr 28, 2026
containerd 1.7.31 unconditionally emits `abi <abi/3.0>,` as line 2 of its
default AppArmor profile template (see contrib/apparmor/template.go in
v1.7.31). Ubuntu 20.04 (focal) ships AppArmor 2.13.x which does not
understand the `abi <...>,` directive, so every container creation on
focal fails:
AppArmor parser error for /tmp/cri-containerd.apparmor.dXXX at line 2:
Could not open 'abi/3.0': No such file or directory
The regression has already been fixed upstream and backported to the
release/1.7 branch:
- containerd/containerd#13268
- containerd/containerd#13273
so 1.7.32 will work fine on focal again. Rather than hard-pinning focal
to 1.7.30 (which would also have to be bumped manually for every future
1.7.x release), this introduces a `containerd_focal_excluded_versions`
list and selects the latest 1.7.x that is **not** in it. Today that
yields 1.7.30; once 1.7.32 ships it will be picked up automatically and
this workaround can be dropped.
Note: v1.6.6 has already been released with the broken default, so we
intentionally do not rewrite history or roll back any deployments --
existing focal hosts that ended up on 1.7.31 will heal on their next
run once 1.7.32 lands (or by manually overriding
`containerd_focal_excluded_versions`).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ricolin <rlin@vexxhost.com>
ricolin
added a commit
to ricolin/ansible-collection-containers
that referenced
this pull request
Apr 28, 2026
containerd 1.7.31 unconditionally emits `abi <abi/3.0>,` as line 2 of its
default AppArmor profile template (see contrib/apparmor/template.go in
v1.7.31). Ubuntu 20.04 (focal) ships AppArmor 2.13.x which does not
understand the `abi <...>,` directive, so every container creation on
focal fails:
AppArmor parser error for /tmp/cri-containerd.apparmor.dXXX at line 2:
Could not open 'abi/3.0': No such file or directory
The regression has already been fixed upstream and backported to the
release/1.7 branch:
- containerd/containerd#13268
- containerd/containerd#13273
so 1.7.32 will work fine on focal again. Rather than hard-pinning focal
to 1.7.30 (which would also have to be bumped manually for every future
1.7.x release), this introduces a `containerd_focal_excluded_versions`
list and selects the latest 1.7.x that is **not** in it. Today that
yields 1.7.30; once 1.7.32 ships it will be picked up automatically and
this workaround can be dropped.
Note: v1.6.6 has already been released with the broken default, so we
intentionally do not rewrite history or roll back any deployments --
existing focal hosts that ended up on 1.7.31 will heal on their next
run once 1.7.32 lands (or by manually overriding
`containerd_focal_excluded_versions`).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ricolin <rlin@vexxhost.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an automated cherry-pick of #13268
/assign cpuguy83