Skip to content

ci: fix conmon job - #5401

Merged
AkihiroSuda merged 2 commits into
opencontainers:mainfrom
kolyshkin:conmon-userns
Aug 18, 2026
Merged

ci: fix conmon job#5401
AkihiroSuda merged 2 commits into
opencontainers:mainfrom
kolyshkin:conmon-userns

Conversation

@kolyshkin

@kolyshkin kolyshkin commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #5399.

The validate / conmon job was mostly passing only because it failed
to pull an image (due to running a big number of parallel pulls I guess)
and skipped the test. This is being fixed in
containers/conmon#668).

Recently the pull started to succeed sometimes, which resulted in
test being actually run, and fail due to nested userns restriction
in Ubuntu, and the missing fixup for that.

This PR adds the fixup, and uses a fixed conmon tests from
containers/conmon#668.

@kolyshkin
kolyshkin force-pushed the conmon-userns branch 2 times, most recently from 6b687dd to 327873d Compare August 13, 2026 20:38
@kolyshkin kolyshkin changed the title ci: fix conmon job on Ubuntu 24.04 (userns/AppArmor) ci: fix conmon job Aug 13, 2026
@kolyshkin kolyshkin added backport/1.5-todo A PR in main branch which needs to be backported to release-1.5 backport/1.4-todo A PR in main branch which needs to backported to release-1.4 backport/1.3-todo A PR in main branch which needs to be backported to release-1.3 labels Aug 13, 2026
kolyshkin and others added 2 commits August 14, 2026 16:04
On Ubuntu 24.04 runners, kernel.apparmor_restrict_unprivileged_userns is
set to 1, so an unconfined process that creates a user namespace is
transitioned to the unprivileged_userns AppArmor profile, which denies
CAP_SYS_ADMIN. As a result, rootless runc creates and maps the user
namespace fine and then fails to unshare the remaining ones:

  runc create failed: unable to start container process: can't get final
  child's PID from pipe: EOF; runc init error(s): nsexec-1: failed to
  unshare remaining namespaces: Operation not permitted

and dmesg shows:

  apparmor="AUDIT" operation="userns_create" info="Userns create -
  transitioning profile" profile="unconfined" comm="runc:[1:CHILD]"
  target="unprivileged_userns"
  apparmor="DENIED" operation="capable" profile="unprivileged_userns"
  comm="runc:[1:CHILD]" capability=21 capname="sys_admin"

Use the same workaround as in test.yml: load an AppArmor profile for the
runc binary being tested.

This went unnoticed because the conmon tests skip when the test image
can't be pulled, so the job was green whenever the pull failed, and only
red when the tests actually ran.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
conmon's test suite skips its container tests when the test image can't
be pulled, and reports the run as successful, so the conmon job here was
green whenever the pull failed and red only when the tests actually ran.

Bump to conmon main, which contains
containers/conmon#668 turning that into a hard
failure, so that this job tests what it is supposed to test.

To be replaced with a conmon tag once one is released (> v2.2.1).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin

Copy link
Copy Markdown
Contributor Author

Need this for green CI and better coverage; PTAL @opencontainers/runc-maintainers

ref: v2.2.1
# XXX: this is conmon main with https://github.com/containers/conmon/pull/668,
# which makes the tests fail, rather than silently skip, and fixes a
# few other things. Switch to a released version once one is out

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do you know if a patch release is planned already?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jnovy might be able to answer; the test fixes alone is not good enough reason to cut a release but maybe there's something else in store.

For now I just want to fix the CI here, and am fine with a temporary sha (I mean, back in the day we had quite a few!)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

heh; yeah, not blocking, just looking if there were plans potentially 😅

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@jnovy

jnovy commented Aug 17, 2026

Copy link
Copy Markdown

@kolyshkin filed PR for cri-o: to fix this upstream to avoid downstream workarounds: cri-o/cri-o#10244

@kolyshkin

Copy link
Copy Markdown
Contributor Author

We need green CI in order to work on other PRs. PTAL @opencontainers/runc-maintainers @AkihiroSuda @lifubang @rata

@AkihiroSuda
AkihiroSuda merged commit 6c72bfe into opencontainers:main Aug 18, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci backport/1.3-todo A PR in main branch which needs to be backported to release-1.3 backport/1.4-todo A PR in main branch which needs to backported to release-1.4 backport/1.5-todo A PR in main branch which needs to be backported to release-1.5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

conmon tests flake on main

4 participants