Skip to content
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

selinux: Print status and usage of RawSelinux #1496

Merged
merged 1 commit into from Jan 23, 2024

Conversation

jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Feb 22, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

The nodestatus controller didn't handle the rawselinux policy at all.
Let's handle the kind in the nodestatus and add a very basic test for
the rawselinuxprofile so that we are sure it works at all.

Which issue(s) this PR fixes:

None

Does this PR have test?

Yes

Special notes for your reviewer:

I have not ran the tests yet :-)

Does this PR introduce a user-facing change?

Fixed reporting of status and the policy usage string for RawSelinuxProfile CRs

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 22, 2023
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 22, 2023
@jhrozek jhrozek force-pushed the rawselinux branch 2 times, most recently from bbd5bf4 to a879b8b Compare February 22, 2023 21:11
Copy link
Contributor

@JAORMX JAORMX left a comment

Choose a reason for hiding this comment

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

Oops! This was a bug from the cut-over to the new policy format. Thanks for addressing this!

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 23, 2023
@jhrozek
Copy link
Contributor Author

jhrozek commented Feb 23, 2023

Huh the e2e tests fail, but for some reason only in the CI environment, directly in-cluster on OCP everything works fine. I'm getting:

E0223 14:35:39.233379       1 controller.go:326]  "msg"="Reconciler error" "error"="getting owner profile: default/raw-errorlogger: cache had type *v1alpha2.SelinuxProfile, but *v1alpha2.RawSelinuxProfile was asked for" "SecurityProfileNodeStatus"={"name":"raw-errorlogger-127.0.0.1","namespace":"default"} "controller"="nodestatus" "controllerGroup"="security-profiles-operator.x-k8s.io" "controllerKind"="SecurityProfileNodeStatus" "name"="raw-errorlogger-127.0.0.1" "namespace"="default" "reconcileID"="56cf8fbe-d1c5-4070-9314-25716dd9a291"

Does anyone know what does the error mean?

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 23, 2023
@JAORMX
Copy link
Contributor

JAORMX commented Feb 24, 2023

@jhrozek sounds to me like there's something wrong or hardcoded in the node status controller: cache had type *v1alpha2.SelinuxProfile, but *v1alpha2.RawSelinuxProfile was asked for

@saschagrunert
Copy link
Member

@jhrozek do you mind a rebase?

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 19, 2023
@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 4, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 4, 2023
@saschagrunert
Copy link
Member

Oh:

not enough arguments in call to e.getSELinuxPolicyUsage

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 6, 2023
@jhrozek
Copy link
Contributor Author

jhrozek commented Jul 6, 2023

oops, let's see how the tests go before another review

@saschagrunert
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 6, 2023
@saschagrunert
Copy link
Member

/test pull-security-profiles-operator-test-e2e

@saschagrunert
Copy link
Member

/test pull-security-profiles-operator-verify

1 similar comment
@saschagrunert
Copy link
Member

/test pull-security-profiles-operator-verify

@saschagrunert
Copy link
Member

@jhrozek may I ask you to rebase please?

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 19, 2024
The nodestatus controller didn't handle the rawselinux policy at all.
Let's handle the kind in the nodestatus and add a very basic test for
the rawselinuxprofile so that we are sure it works at all.
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 23, 2024
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 23, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ccojocar, JAORMX, jhrozek, saschagrunert

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:
  • OWNERS [JAORMX,ccojocar,jhrozek,saschagrunert]

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

@k8s-ci-robot k8s-ci-robot merged commit 5cbcd1d into kubernetes-sigs:main Jan 23, 2024
26 checks passed
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants