Bug 2069997

Summary: [4.11] should add user containers in /etc/subuid and /etc/subgid to support run pods in user namespaces
Product: OpenShift Container Platform Reporter: MinLi <minmli>
Component: NodeAssignee: Peter Hunt <pehunt>
Node sub component: CRI-O QA Contact: pmali
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: pmali
Version: 4.11   
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: cri-o-1.24.0-9.rhaos4.11.git77718dc.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 11:02:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description MinLi 2022-03-30 08:51:33 UTC
Description of problem:
We should add user containers in /etc/subuid and /etc/subgid to support run pods in user namespaces.
Now /etc/subuid and /etc/subgid only show: core:100000:65536
If we want to run pod in user namespaces, we have to add user containers via a MachineConfig. We should add "containers" entry in /etc/subuid and /etc/subgid by default, for example:
containers:200000:268435456

Version-Release number of selected component (if applicable):
4.11.0-0.nightly-2022-03-27-140854

How reproducible:
always

Steps to Reproduce:
1.create a ocp cluster 

2.oc debug node/ip-10-0-158-142.us-east-2.compute.internal

3.
sh-4.4# chroot /host 
sh-4.4# cat /etc/subgid
core:100000:65536
sh-4.4# cat /etc/subuid
core:100000:65536

Actual results:
3 /etc/sub[u,g]id file only include core:100000:65536

Expected results:
3 /etc/sub[u,g]id file should include entry "containers"

Additional info:
there is a similar bug in 4.10: https://bugzilla.redhat.com/show_bug.cgi?id=2038827

Comment 1 Peter Hunt 2022-03-31 18:38:43 UTC
updated with attached build

Comment 6 errata-xmlrpc 2022-08-10 11:02:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5069