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

Is it possible to make the error retrieving resource lock for leader election Fatal? #1280

Open
smg247 opened this issue Jul 11, 2023 · 10 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@smg247
Copy link

smg247 commented Jul 11, 2023

We have recently uncovered an error in our boskos instance like the following:

E0710 21:02:45.211259 1 leaderelection.go:330] error retrieving resource lock ci/boskos-cleaner-leaderlock: leases.coordination.k8s.io "boskos-cleaner-leaderlock" is forbidden: User "system:serviceaccount:ci:boskos" cannot get resource "leases" in API group "coordination.k8s.io" in the namespace "ci"

This went unnoticed for quite some time as it is not a fatal error so the pod wasn't killed (and our alerting was never triggered). Is it possible to make the following errors Fatal?

@k8s-triage-robot
Copy link

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

This bot triages un-triaged issues 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 issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue 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 Jan 25, 2024
@k8s-triage-robot
Copy link

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

This bot triages un-triaged issues 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 issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue 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 Feb 24, 2024
@k8s-triage-robot
Copy link

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

This bot triages issues 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 issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

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

/close not-planned

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

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

This bot triages issues 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 issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

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

/close not-planned

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.

@k8s-ci-robot k8s-ci-robot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 25, 2024
@Gatete-Bruno
Copy link

E0611 21:13:40.731888 1 leaderelection.go:332] error retrieving resource lock email-operator-system/650681eb.batman.example.com: leases.coordination.k8s.io "650681eb.batman.example.com" is forbidden: User "system:serviceaccount:email-operator-system:email-operator-email-operator-controller-manager" cannot get resource "leases" in API group "coordination.k8s.io" in the namespace "email-operator-system"

@maggie44
Copy link

maggie44 commented Sep 30, 2024

I am running in to this issue too. Three pods were all failing as they were unable to access the lease, and yet the pods remained healthy so the issue went unnoticed. It led to a lot of issues.

Happy to raise a PR if we can come up with a solution. I had a look through the code with the hope of finding a non-breaking solution. Exiting with an error could potentially be disruptive to some as current behaviour is during temporary outages there would be a retry.

Another option could be adding in a check as part of the HealthzAdaptor:

func (l *HealthzAdaptor) Check(req *http.Request) error {
There isn't an obvious interface for checking for these errors though, or for enacting a ping to the API.

@maggie44
Copy link

/reopen

@k8s-ci-robot
Copy link
Contributor

@maggie44: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

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.

@smg247
Copy link
Author

smg247 commented Oct 7, 2024

/reopen

@k8s-ci-robot
Copy link
Contributor

@smg247: Reopened this issue.

In response to this:

/reopen

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 reopened this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

5 participants