-
Notifications
You must be signed in to change notification settings - Fork 106
Allow container access to runtime directories for crun masked path optimization #393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow container access to runtime directories for crun masked path optimization #393
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdated SELinux policy to grant container_t read access to the shared empty-directory under container_var_run_t, enabling crun’s masked-path optimization to use a shared directory instead of fallback tmpfs mounts. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…timization Problem: crun PR #1859 (containers/crun#1859) optimizes masked paths by using a shared empty directory instead of individual tmpfs mounts. However, containers cannot access this shared directory due to SELinux policy: avc: denied { read } for name=".empty-directory" scontext=container_t:s0:c139,c767 tcontext=container_var_run_t:s0 Without this policy, the optimization falls back to individual tmpfs mounts, negating the performance benefits. Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
0fe3a9b
to
0a82f95
Compare
Ephemeral COPR build failed. @containers/packit-build please check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sourcery-ai[bot]: changing LGTM is restricted to collaborators In response to this:
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-sigs/prow repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lsm5, sohankunkerkar, sourcery-ai[bot] The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold |
ugh, looks like i was too late to add the hold. I should update the merge bot config to only use If anybody objects to the change, I'll post a revert, so lmk. |
module crun_thermal_fix 1.0;
require {
type container_t;
type container_var_run_t;
type container_file_t;
class dir { read open search getattr };
}
# Allow containers to access shared runtime directories for crun masked path optimization
# This enables the thermal_throttle sharing fix for CNV scenarios
allow container_t container_var_run_t:dir { read open search getattr };
allow container_t container_file_t:dir { read open search getattr }; This policy worked well while testing on the real clusters. |
/cherrypick rhaos-maint |
@lsm5: new pull request created: #396 In response to this:
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-sigs/prow repository. |
Problem: crun PR #1859 (containers/crun#1859) optimizes masked paths by using a shared empty directory instead of individual tmpfs mounts. However, containers cannot access this shared directory due to SELinux policy:
Without this policy, the optimization falls back to individual tmpfs mounts, negating the performance benefits.
Summary by Sourcery
Bug Fixes: