Skip to content

[release/1.7] apparmor: Set abi conditionally#13273

Merged
mxpv merged 1 commit into
containerd:release/1.7from
k8s-infra-cherrypick-robot:cherry-pick-13268-to-release/1.7
Apr 23, 2026
Merged

[release/1.7] apparmor: Set abi conditionally#13273
mxpv merged 1 commit into
containerd:release/1.7from
k8s-infra-cherrypick-robot:cherry-pick-13268-to-release/1.7

Conversation

@k8s-infra-cherrypick-robot

@k8s-infra-cherrypick-robot k8s-infra-cherrypick-robot commented Apr 23, 2026

Copy link
Copy Markdown

This is an automated cherry-pick of #13268

/assign cpuguy83

Set AppArmor abi conditionally to support versions < 3.0

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>
@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review Apr 23, 2026
@mxpv mxpv merged commit e7da387 into containerd:release/1.7 Apr 23, 2026
52 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants