Skip to content

[release-1.35] server: Always include UID/GID mappings for user namespace containers#9713

Merged
openshift-merge-bot[bot] merged 2 commits into
cri-o:release-1.35from
openshift-cherrypick-robot:cherry-pick-9712-to-release-1.35
Jan 15, 2026
Merged

[release-1.35] server: Always include UID/GID mappings for user namespace containers#9713
openshift-merge-bot[bot] merged 2 commits into
cri-o:release-1.35from
openshift-cherrypick-robot:cherry-pick-9712-to-release-1.35

Conversation

@openshift-cherrypick-robot

Copy link
Copy Markdown

This is an automated cherry-pick of #9712

/assign saschagrunert

Fixed a regression in v1.35.0 where systemd containers with `hostUsers: false` (user namespaces enabled) would fail with "Permission denied" errors when systemd attempted to create cgroups.

When containers join a user namespace via path, UID/GID mappings must
still be included in the OCI spec. While the namespace path indicates
which namespace to join, the mappings are essential for the runtime to
properly handle file ownership operations, particularly cgroup delegation.

Without these mappings, runtimes cannot chown the cgroup directory to
the mapped UID 0, causing systemd containers to fail with "Permission
denied" when attempting to create cgroups like /init.scope.

This restores the behavior from v1.34.4 where both namespace path and
mappings coexisted successfully.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
Add integration test to verify that containers joining a user namespace
via path still have UID/GID mappings in their OCI spec. This ensures
proper cgroup delegation for systemd containers.

The test verifies:
- User namespace path is set (joining sandbox's userns)
- uidMappings and gidMappings are present in config.json
- Container can start successfully
- Container can access cgroups

This prevents regression of the issue fixed in the previous commit where
missing mappings caused systemd containers to fail with "Permission denied"
when creating cgroups.

Regression test for: cri-o#9705

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@openshift-ci openshift-ci Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jan 14, 2026
@coderabbitai

coderabbitai Bot commented Jan 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Jan 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.51%. Comparing base (92c18a2) to head (bf54610).
⚠️ Report is 3 commits behind head on release-1.35.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.35    #9713      +/-   ##
================================================
- Coverage         67.57%   67.51%   -0.06%     
================================================
  Files               209      209              
  Lines             29057    29056       -1     
================================================
- Hits              19634    19618      -16     
- Misses             7752     7762      +10     
- Partials           1671     1676       +5     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jan 15, 2026
@openshift-ci

openshift-ci Bot commented Jan 15, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: openshift-cherrypick-robot, saschagrunert

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 15, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit 7deb12c into cri-o:release-1.35 Jan 15, 2026
47 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants