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

Skip to content

Conversation

@haircommander
Copy link
Member

@haircommander haircommander commented Oct 1, 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

@openshift-ci openshift-ci bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. 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. labels Oct 1, 2021
@openshift-ci openshift-ci bot requested a review from vrothberg October 1, 2021 16:27
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 1, 2021
@haircommander haircommander changed the title server: conditionally relabel volumes given annotation WIP server: conditionally relabel volumes given annotation Oct 1, 2021
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 1, 2021
@haircommander
Copy link
Member Author

wip because I have vendored opencontainers/selinux#161

@haircommander haircommander force-pushed the selinux-maybe branch 4 times, most recently from 3e426c9 to 502f4e9 Compare October 1, 2021 18:32
@codecov
Copy link

codecov bot commented Oct 1, 2021

Codecov Report

Merging #5373 (9dda811) into main (fc8d744) will decrease coverage by 0.01%.
The diff coverage is 14.28%.

❗ Current head 9dda811 differs from pull request most recent head 87b8e5d. Consider uploading reports for the commit 87b8e5d to get more accurate results

@@            Coverage Diff             @@
##             main    #5373      +/-   ##
==========================================
- Coverage   43.75%   43.73%   -0.02%     
==========================================
  Files         118      118              
  Lines       11737    11746       +9     
==========================================
+ Hits         5135     5137       +2     
- Misses       6114     6121       +7     
  Partials      488      488              

OCISeccompBPFHookAnnotation = "io.containers.trace-syscall"

// MaybeSELinuxLabelAnnotation is the annotation used for optionally skipping relabeling a volume with the specified SELinux label.
// The label will not happen if the top layer is already labeled correctly.
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: s/The label will not happen /The relabeling will be skipped /

Copy link
Collaborator

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM overall, let's just wait for opencontainers/selinux#161

@haircommander haircommander changed the title WIP server: conditionally relabel volumes given annotation server: conditionally relabel volumes given annotation Oct 4, 2021
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 4, 2021
@haircommander
Copy link
Member Author

we don't technically need the SELinux commit, though it makes it safer. I've dropped and it can be included asynchronously

@haircommander
Copy link
Member Author

@cri-o/cri-o-maintainers PTAL
/retest

// of the translation between CRI config -> oci/storage container in the container package

// TODO: eventually, this should be in the container package, but it's going through a lot of churn
// and SpecAddAnnotations is already passed too many arguments
Copy link
Contributor

Choose a reason for hiding this comment

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

nit of a nit, ignore unless you get other changes

Suggested change
// and SpecAddAnnotations is already passed too many arguments
// and SpecAddAnnotations is already passing too many arguments

Copy link
Member Author

Choose a reason for hiding this comment

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

updated

@TomSweeneyRedHat
Copy link
Contributor

LGTM
assuming happy tests

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, just one non blocking nit

Comment on lines 35 to 37
// MaybeSELinuxLabelAnnotation is the annotation used for optionally skipping relabeling a volume with the specified SELinux label.
// The relabeling will be skipped if the top layer is already labeled correctly.
MaybeSELinuxLabelAnnotation = "io.kubernetes.cri-o.MaybeSELinuxLabel"
Copy link
Member

Choose a reason for hiding this comment

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

non blocking nit because this may already been discussed: I would prefer having something more specific here like "io.kubernetes.cri-o.SkipSELinuxLabel" or "io.kubernetes.cri-o.SkipVolumeSELinuxLabel"

Copy link
Member Author

Choose a reason for hiding this comment

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

changed it to TrySkipSELinuxLabel

Copy link
Member Author

Choose a reason for hiding this comment

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

does that work for you? also wondering @kolyshkin 's thought

Copy link
Member

Choose a reason for hiding this comment

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

Works for me, yes thank you!

@haircommander haircommander force-pushed the selinux-maybe branch 2 times, most recently from 8c0675d to d1b16bb Compare October 5, 2021 14:54
@nee1esh
Copy link

nee1esh commented Oct 5, 2021

/retest-required

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 7, 2021

@haircommander: Overrode contexts on behalf of haircommander: ci/openshift-jenkins/integration_rhel

Details

In response to this:

/override ci/openshift-jenkins/integration_rhel

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.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

5 similar comments
@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@haircommander
Copy link
Member Author

/hold

found a bug

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 7, 2021
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 7, 2021
@haircommander
Copy link
Member Author

/unhold

it works 🎉

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 7, 2021
@haircommander
Copy link
Member Author

/override ci/openshift-jenkins/e2e_rhel
/override ci/openshift-jenkins/integration_rhel

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 7, 2021

@haircommander: Overrode contexts on behalf of haircommander: ci/openshift-jenkins/e2e_rhel, ci/openshift-jenkins/integration_rhel

Details

In response to this:

/override ci/openshift-jenkins/e2e_rhel
/override ci/openshift-jenkins/integration_rhel

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.

Copy link
Member

@mrunalp mrunalp 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 7, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 7, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander, kolyshkin, mrunalp, 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,kolyshkin,mrunalp,saschagrunert]

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

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 7, 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/e2e_crun_cgroupv2 ce3cfaa link false /test e2e_cgroupv2
ci/openshift-jenkins/integration_crun_cgroupv2 87b8e5d link false /test integration_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.

@haircommander
Copy link
Member Author

/override ci/openshift-jenkins/integration_rhel

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 7, 2021

@haircommander: Overrode contexts on behalf of haircommander: ci/openshift-jenkins/integration_rhel

Details

In response to this:

/override ci/openshift-jenkins/integration_rhel

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.

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.

8 participants