Skip to content

cri: selinuxrelabel=false for /dev/shm w/ host ipc#4705

Merged
estesp merged 1 commit intocontainerd:masterfrom
dweomer:selinx-relabel-dev-shm-but-not-with-hostipc
Nov 17, 2020
Merged

cri: selinuxrelabel=false for /dev/shm w/ host ipc#4705
estesp merged 1 commit intocontainerd:masterfrom
dweomer:selinx-relabel-dev-shm-but-not-with-hostipc

Conversation

@dweomer
Copy link
Copy Markdown
Contributor

@dweomer dweomer commented Nov 9, 2020

This is a followup to #4699 that addresses an oversight that could cause
the CRI to relabel the host /dev/shm, which should be a no-op in most
cases. Additionally, fixes unit tests to make correct assertions for
/dev/shm relabeling.

Discovered while applying the changes for #4699 to containerd/cri 1.4:
containerd/cri#1605

Signed-off-by: Jacob Blain Christen [email protected]

@k8s-ci-robot
Copy link
Copy Markdown

Hi @dweomer. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@dweomer
Copy link
Copy Markdown
Contributor Author

dweomer commented Nov 9, 2020

@crosbymichael I am not sure if this is necessary but it seemed like a reasonable guard to have in place (don't attempt to relabel host /dev/shm).

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Nov 9, 2020

Build succeeded.

@dweomer
Copy link
Copy Markdown
Contributor Author

dweomer commented Nov 9, 2020

Comment thread pkg/cri/server/container_create_linux.go Outdated
This is a followup to containerd#4699 that addresses an oversight that could cause
the CRI to relabel the host /dev/shm, which should be a no-op in most
cases. Additionally, fixes unit tests to make correct assertions for
/dev/shm relabeling.

Discovered while applying the changes for containerd#4699 to containerd/cri 1.4:
containerd/cri#1605

Signed-off-by: Jacob Blain Christen <[email protected]>
@dweomer dweomer force-pushed the selinx-relabel-dev-shm-but-not-with-hostipc branch from 4d3b20f to a1e7dd9 Compare November 11, 2020 22:22
Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Nov 11, 2020

Build succeeded.

@dweomer
Copy link
Copy Markdown
Contributor Author

dweomer commented Nov 12, 2020

I have verified that this fixes an actual problem in our 1.3 and 1.4 forks we maintain for k3s

Copy link
Copy Markdown
Member

@dims dims left a comment

Choose a reason for hiding this comment

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

LGTM

@estesp estesp merged commit 8efb17c into containerd:master Nov 17, 2020
@dweomer dweomer deleted the selinx-relabel-dev-shm-but-not-with-hostipc branch November 17, 2020 15:01
@thaJeztah
Copy link
Copy Markdown
Member

cherry-pick (containerd/cri#1605) was merged, but needs a re-vendor

@thaJeztah thaJeztah added cherry-picked/1.4.x PR commits are cherry picked into the release/1.4 branch and removed cherry-pick/1.4.x labels Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/1.4.x PR commits are cherry picked into the release/1.4 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants