Bug 1831866

Summary: CRI-O should manage namespace lifecycle
Product: OpenShift Container Platform Reporter: Peter Hunt <pehunt>
Component: NodeAssignee: Peter Hunt <pehunt>
Status: CLOSED ERRATA QA Contact: Sunil Choudhary <schoudha>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.5CC: aos-bugs, jokerman
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-13 17:35:12 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 Peter Hunt 2020-05-05 19:05:29 UTC
Description of problem:
CRI-O currently mounts namespaces by attaching to the /proc/$pid/ns of the infra container. This causes races with the kernel (as /proc entries can be torn down anytime after the infra container is stopped, leaving inconsistent state in CRI-O).
CRI-O should instead manage its own namespace lifecycle

Version-Release number of selected component (if applicable):
4.5

How reproducible:
100%

Steps to Reproduce:
1. create a pod and container in cri-o (with crictl or kubectl)
2. run `sudo runc state $ctr_id | jq .bundle` to get the location of the bundle
3. run `cat $bundle_dir/config.json | jq .linux.namespaces` and find where the namespaces are attached

Actual results:
paths are in /proc

Expected results:
paths should be somewhere else (/var/run, for instance)

Additional info:

Comment 4 errata-xmlrpc 2020-07-13 17:35:12 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, 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/RHBA-2020:2409