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

CNF-12792:nto: add configmaps/finalizers under operator Role #3992

Merged
merged 2 commits into from
May 22, 2024

Conversation

Tal-or
Copy link
Contributor

@Tal-or Tal-or commented May 7, 2024

What this PR does / why we need it:
NTO is watching for the ConfigMap that encpasulets the PerformanceProfile and creates different components based on the given profile.

We should block the PerformanceProfile deletion as long as the dependent components exist.

For that NTO needs access the finalizers of the ConfigMap.

We should also update the control plane operator since
it's its responsibility to update NTO's role.

Which issue(s) this PR fixes
Fixes # CNF-11559

@openshift-ci openshift-ci bot requested review from hasueki and sjenning May 7, 2024 09:43
@openshift-ci openshift-ci bot added area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release and removed do-not-merge/needs-area labels May 7, 2024
@sjenning
Copy link
Contributor

sjenning commented May 7, 2024

This needs to be added to the control-plane-operator role as well.

failed to update control plane: failed to reconcile cluster node tuning operator: failed to reconcile cluster node tuning operator role: roles.rbac.authorization.k8s.io \"cluster-node-tuning-operator\" is forbidden: user \"system:serviceaccount:e2e-clusters-5526g-example-tm6z7:control-plane-operator\" (groups=[\"system:serviceaccounts\" \"system:serviceaccounts:e2e-clusters-5526g-example-tm6z7\" \"system:authenticated\"]) is attempting to grant RBAC permissions not currently held:\n{APIGroups:[\"\"], Resources:[\"configmaps/finalizers\"], Verbs:[\"*\"]}"

@openshift-ci openshift-ci bot added the area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release label May 8, 2024
@Tal-or
Copy link
Contributor Author

Tal-or commented May 8, 2024

This needs to be added to the control-plane-operator role as well.

failed to update control plane: failed to reconcile cluster node tuning operator: failed to reconcile cluster node tuning operator role: roles.rbac.authorization.k8s.io \"cluster-node-tuning-operator\" is forbidden: user \"system:serviceaccount:e2e-clusters-5526g-example-tm6z7:control-plane-operator\" (groups=[\"system:serviceaccounts\" \"system:serviceaccounts:e2e-clusters-5526g-example-tm6z7\" \"system:authenticated\"]) is attempting to grant RBAC permissions not currently held:\n{APIGroups:[\"\"], Resources:[\"configmaps/finalizers\"], Verbs:[\"*\"]}"

Thank you @sjenning updated as requested PTAL

Copy link

netlify bot commented May 8, 2024

Deploy Preview for hypershift-docs ready!

Name Link
🔨 Latest commit 0906651
🔍 Latest deploy log https://app.netlify.com/sites/hypershift-docs/deploys/663b4ebae5d0680008d69889
😎 Deploy Preview https://deploy-preview-3992--hypershift-docs.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 site configuration.

@stevekuznetsov
Copy link
Contributor

/lgtm
/retest

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 8, 2024
@Tal-or
Copy link
Contributor Author

Tal-or commented May 8, 2024

I added the permissions to the control plane operator but the error persist:

    hypershift_framework.go:395: ReconciliationSucceeded, Reason: ReconciliationError, Message: failed to reconcile control plane operator: failed to reconcile controlplane operator role: roles.rbac.authorization.k8s.io "control-plane-operator" is forbidden: user "system:serviceaccount:hypershift:operator" (groups=["system:serviceaccounts" "system:serviceaccounts:hypershift" "system:authenticated"]) is attempting to grant RBAC permissions not currently held:
        {APIGroups:[""], Resources:["configmaps/finalizers"], Verbs:["*"]}

@Tal-or
Copy link
Contributor Author

Tal-or commented May 12, 2024

I added the permissions to the control plane operator but the error persist:

    hypershift_framework.go:395: ReconciliationSucceeded, Reason: ReconciliationError, Message: failed to reconcile control plane operator: failed to reconcile controlplane operator role: roles.rbac.authorization.k8s.io "control-plane-operator" is forbidden: user "system:serviceaccount:hypershift:operator" (groups=["system:serviceaccounts" "system:serviceaccounts:hypershift" "system:authenticated"]) is attempting to grant RBAC permissions not currently held:
        {APIGroups:[""], Resources:["configmaps/finalizers"], Verbs:["*"]}

@sjenning Could you please have take a look? it seems like the hypershift operator needs some additional permissions as well but I couldn't find the relevant files

NTO is watching for the `ConfigMap` that encpasulets the `PerformanceProfile`
and creates different components based on the given profile.

We should block the `PerformanceProfile` deletion as long as the
dependent components exist.

For that NTO needs access the finalizers of the `ConfigMap`.

We should also update the control plane operator since
it's its responsibility to update NTO's role.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
@openshift-ci openshift-ci bot added area/cli Indicates the PR includes changes for CLI and removed lgtm Indicates that a PR is ready to be merged. labels May 12, 2024
@Tal-or
Copy link
Contributor Author

Tal-or commented May 12, 2024

/retest

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
@openshift-ci openshift-ci bot added the area/ci-tooling Indicates the PR includes changes for CI or tooling label May 12, 2024
@Tal-or
Copy link
Contributor Author

Tal-or commented May 12, 2024

/retest

@stevekuznetsov
Copy link
Contributor

/lgtm
/retest

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 13, 2024
@Tal-or
Copy link
Contributor Author

Tal-or commented May 15, 2024

/retest

@Tal-or
Copy link
Contributor Author

Tal-or commented May 15, 2024

The failure doesn't seems related to this PR and also reproduced on other PRs here

error: timed out waiting for the condition on hostedclusters/400b93ce3e99541261a6-mgmt
{"component":"entrypoint","error":"wrapped process failed: exit status 1","file":"sigs.k8s.io/prow/pkg/entrypoint/run.go:84","func":"sigs.k8s.io/prow/pkg/entrypoint.Options.internalRun","level":"error","msg":"Error executing test process","severity":"error","time":"2024-05-15T08:15:19Z"}
error: failed to execute wrapped command: exit status 1
---
Link to step on registry info site: https://steps.ci.openshift.org/reference/create-management-cluster
Link to job on registry info site: https://steps.ci.openshift.org/job?org=openshift&repo=hypershift&branch=main&test=e2e-azure, "e2e-azure" post steps failed: "e2e-azure" pod "e2e-azure-destroy-management-cluster" failed: could not watch pod: the pod ci-op-k9wjbwri/e2e-azure-destroy-management-cluster failed after 40m11s (failed containers: test): ContainerFailed one or more containers exited
Container test exited with code 1, reason Error
---
enshift/hypershift/cmd/cluster/core.waitForRestOfFinalizers
	/hypershift/cmd/cluster/core/destroy.go:198
github.com/openshift/hypershift/cmd/cluster/core.DestroyCluster
	/hypershift/cmd/cluster/core/destroy.go:119
github.com/openshift/hypershift/cmd/cluster/azure.DestroyCluster
	/hypershift/cmd/cluster/azure/destroy.go:71
github.com/openshift/hypershift/cmd/cluster/azure.NewDestroyCommand.func1
	/hypershift/cmd/cluster/azure/destroy.go:41
github.com/spf13/cobra.(*Command).execute
	/hypershift/vendor/github.com/spf13/cobra/command.go:920
github.com/spf13/cobra.(*Command).ExecuteC
	/hypershift/vendor/github.com/spf13/cobra/command.go:1044
github.com/spf13/cobra.(*Command).Execute
	/hypershift/vendor/github.com/spf13/cobra/command.go:968
github.com/spf13/cobra.(*Command).ExecuteContext
	/hypershift/vendor/github.com/spf13/cobra/command.go:961
main.main
	/hypershift/main.go:70

@sjenning
Copy link
Contributor

/approve

Copy link
Contributor

openshift-ci bot commented May 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sjenning, Tal-or

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 16, 2024
@Tal-or Tal-or changed the title nto: add configmaps/finalizers under operator Role CNF-12792: nto: add configmaps/finalizers under operator Role May 16, 2024
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 16, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented May 16, 2024

@Tal-or: This pull request references CNF-12792 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set.

In response to this:

What this PR does / why we need it:
NTO is watching for the ConfigMap that encpasulets the PerformanceProfile and creates different components based on the given profile.

We should block the PerformanceProfile deletion as long as the dependent components exist.

For that NTO needs access the finalizers of the ConfigMap.

We should also update the control plane operator since
it's its responsibility to update NTO's role.

Which issue(s) this PR fixes
Fixes # CNF-11559

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 openshift-eng/jira-lifecycle-plugin repository.

@Tal-or Tal-or changed the title CNF-12792: nto: add configmaps/finalizers under operator Role CNF-12792:nto: add configmaps/finalizers under operator Role May 16, 2024
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD a492a9a and 2 for PR HEAD 4f17a8d in total

@Tal-or
Copy link
Contributor Author

Tal-or commented May 17, 2024

/retest-required

@Tal-or
Copy link
Contributor Author

Tal-or commented May 17, 2024

/jira refresh

@openshift-ci-robot
Copy link

openshift-ci-robot commented May 17, 2024

@Tal-or: This pull request references CNF-12792 which is a valid jira issue.

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@Tal-or
Copy link
Contributor Author

Tal-or commented May 17, 2024

/retest-required

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 630c4d8 and 1 for PR HEAD 4f17a8d in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD c698d1d and 0 for PR HEAD 4f17a8d in total

@openshift-ci-robot
Copy link

/hold

Revision 4f17a8d was retested 3 times: holding

@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 May 18, 2024
@Tal-or
Copy link
Contributor Author

Tal-or commented May 19, 2024

/retest-required

1 similar comment
@Tal-or
Copy link
Contributor Author

Tal-or commented May 19, 2024

/retest-required

@Tal-or
Copy link
Contributor Author

Tal-or commented May 19, 2024

/test e2e-kubevirt-aws-ovn

1 similar comment
@Tal-or
Copy link
Contributor Author

Tal-or commented May 20, 2024

/test e2e-kubevirt-aws-ovn

@Tal-or
Copy link
Contributor Author

Tal-or commented May 21, 2024

/retest

Copy link
Contributor

openshift-ci bot commented May 21, 2024

@Tal-or: The following test 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/prow/e2e-azure 4f17a8d link false /test e2e-azure

Full PR test history. Your PR dashboard.

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

@Tal-or
Copy link
Contributor Author

Tal-or commented May 21, 2024

/hold cancel

@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 May 21, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 8c509b7 into openshift:main May 22, 2024
12 of 13 checks passed
@Tal-or Tal-or deleted the nto_role_add_finalizers branch May 22, 2024 08:17
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. area/ci-tooling Indicates the PR includes changes for CI or tooling area/cli Indicates the PR includes changes for CLI area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants