Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@haircommander
Copy link
Member

@haircommander haircommander commented Oct 13, 2021

What type of PR is this?

/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Add support for "io.kubernetes.cri-o.TrySkipVolumeSELinuxLabel" annotation, which tells CRI-O to skip relabeling volumes if the top level is already correctly labeled
Skip SELinux volume relabeling for super privileged containers (`securityContext.seLinuxOptions.type = "spc_t"`).

RHEL/CentOS 7's container-selinux package replaces container_file_t with svirt_sandbox_file_t
under the hood. This causes the annotation to not work correctly.

Signed-off-by: Peter Hunt <[email protected]>
@openshift-ci openshift-ci bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Oct 13, 2021
@haircommander haircommander changed the title server: conditionally relabel volumes given annotation [1.22] server: conditionally relabel volumes given annotation Oct 13, 2021
@openshift-ci openshift-ci bot requested review from giuseppe and sameo October 13, 2021 17:29
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 13, 2021
@codecov
Copy link

codecov bot commented Oct 13, 2021

Codecov Report

Merging #5403 (91acfb2) into release-1.22 (feb4cbe) will decrease coverage by 0.02%.
The diff coverage is 9.37%.

❗ Current head 91acfb2 differs from pull request most recent head 4ce3396. Consider uploading reports for the commit 4ce3396 to get more accurate results

@@               Coverage Diff                @@
##           release-1.22    #5403      +/-   ##
================================================
- Coverage         43.75%   43.72%   -0.03%     
================================================
  Files               118      118              
  Lines             11731    11743      +12     
================================================
+ Hits               5133     5135       +2     
- Misses             6110     6120      +10     
  Partials            488      488              

@haircommander
Copy link
Member Author

/retest

@haircommander
Copy link
Member Author

/retest

If a container or pod specifies the SELinux type `spc_t`, then we skip
the volume relabel.

Signed-off-by: Sascha Grunert <[email protected]>
@haircommander
Copy link
Member Author

nabbed #5386 as well

@haircommander
Copy link
Member Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 13, 2021

@haircommander: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/openshift-jenkins/integration_crun_cgroupv2 4ce3396 link false /test integration_cgroupv2
ci/openshift-jenkins/e2e_crun_cgroupv2 4ce3396 link false /test e2e_cgroupv2

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 14, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 14, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander, saschagrunert

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [haircommander,saschagrunert]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit d745cab into cri-o:release-1.22 Oct 14, 2021
@haircommander
Copy link
Member Author

/cherry-pick release-1.21

@openshift-cherrypick-robot

@haircommander: #5403 failed to apply on top of branch "release-1.21":

Applying: server: reduce args in addOCIBindMounts
Applying: test: refactor allowed_annotation tests
Applying: server: conditionally relabel volumes given annotation
Using index info to reconstruct a base tree...
M	pkg/annotations/annotations.go
M	server/container_create.go
M	server/container_create_linux.go
Falling back to patching base and 3-way merge...
Auto-merging server/container_create_linux.go
Auto-merging server/container_create.go
Auto-merging pkg/annotations/annotations.go
CONFLICT (content): Merge conflict in pkg/annotations/annotations.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0003 server: conditionally relabel volumes given annotation
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Details

In response to this:

/cherry-pick release-1.21

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.

@haircommander
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants