Skip to content

Conversation

etharendil
Copy link

nodefeatures has ownerRef to gpu-operator-node-feature-discovery-worker DaemonSet

  ownerReferences:
  - apiVersion: apps/v1
    blockOwnerDeletion: true
    controller: true
    kind: DaemonSet
    name: gpu-operator-node-feature-discovery-worker
    uid: 66a15f02-08ec-4c43-b659-1b9d1641f6f4

gpu-operator-node-feature-discovery-worker pods are trying to set the blockOwnerDeletion but failing

"main.go:91] " error while running" err="failed to advertise features (via CRD API): failed to create NodeFeature object \"skynet-dev-b6zqb\": nodefeatures.nfd.k8s-sigs.io \"skynet-dev-b6zqb\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>"

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 21, 2025
Copy link

netlify bot commented Jul 21, 2025

Deploy Preview for kubernetes-sigs-nfd ready!

Name Link
🔨 Latest commit 7cc79b6
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-nfd/deploys/687eada2f1e3010008c74dda
😎 Deploy Preview https://deploy-preview-2198--kubernetes-sigs-nfd.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot requested a review from jjacobelli July 21, 2025 21:14
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: etharendil
Once this PR has been reviewed and has the lgtm label, please assign arangogutierrez for approval. For more information see the Code Review Process.

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

Needs approval from an approver in each of these files:

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 requested a review from marquiz July 21, 2025 21:14
@k8s-ci-robot
Copy link
Contributor

Welcome @etharendil!

It looks like this is your first PR to kubernetes-sigs/node-feature-discovery 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/node-feature-discovery has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @etharendil. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 21, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds RBAC permissions for daemonsets finalizers to resolve an issue where node-feature-discovery worker pods cannot set blockOwnerDeletion on NodeFeature objects due to insufficient permissions on the referenced DaemonSet.

  • Adds permissions for daemonsets/finalizers resource in the apps API group
  • Grants get, update, and delete verbs for finalizer operations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

verbs:
- get
- update
- delete
Copy link
Preview

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

The delete verb on daemonsets/finalizers may be overly permissive. Consider if only get and update verbs are sufficient for setting blockOwnerDeletion, as delete allows removing finalizers from any DaemonSet which could impact cleanup behavior.

Suggested change
- delete

Copilot uses AI. Check for mistakes.

Copy link
Contributor

Choose a reason for hiding this comment

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

++

@ArangoGutierrez
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 9, 2025
@marquiz
Copy link
Contributor

marquiz commented Sep 19, 2025

Maybe a better fix would be to not set blockOwnerDeletion. I don't think that's needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants