[backport 1.19] cri: pull in updated /dev/shm fix #2507
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Do not relabel container /dev/shm when it is host /dev/shm.
Types of Changes
bugfix
Verification
kubectl run envoy --image=envoyproxy/envoy:v1.14.1 pod/envoy created # after some seconds, should get a running pod: kubectl get pod NAME READY STATUS RESTARTS AGE envoy 1/1 Running 0 18s
Additionally, with HostIPC=true:
And a directory listing of
/dev/shm
should look like:ls -alZ /dev/shm/ drwxrwxrwt. root root system_u:object_r:tmpfs_t:s0 . drwxr-xr-x. root root system_u:object_r:device_t:s0 .. -rw-------. root root system_u:object_r:container_file_t:s0 envoy_shared_memory_0
Specifically,
/dev/shm
should NOT have thecontainer_file_t
context label.Linked Issues
#2240
Further Comments
cherry-picked from containerd/cri#1605