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

Bug 1958885: Switch to client-go leader-with-lease election. #238

Conversation

jmencak
Copy link
Contributor

@jmencak jmencak commented Jun 21, 2021

This is a backport of #229 into 4.7.

Previously, NTO relied on the operator-sdk (leader-for-life) way of handling leader election. The leader-for-life was implemented by relying on k8s garbage collector mechanism the same way as implemented by operator-sdk. Unfortunately, practise shows (rhbz#1916865, rhbz#1958885, rhbz#1962219) this is not reliable as the ConfigMap locks are sometimes not garbage collected.

Therefore, switch to leader-with-lease election mechanism as provided by the client-go package, which seems to be more reliable at this point.

Other changes:

  • fix incorrect error reporting on metrics server shutdown
  • fix default_irq_smp_affinity e2e test for systems with less then 4 CPUs
  • go mod tidy

This is a backport of PR#229 into 4.7.

Previously, NTO relied on the operator-sdk (leader-for-life) way of
handling leader election.  The leader-for-life was implemented by
relying on k8s garbage collector mechanism the same way as implemented
by operator-sdk.  Unfortunately, practise shows (rhbz#1916865,
rhbz#1958885, rhbz#1962219) this is not reliable as the ConfigMap locks
are sometimes not garbage collected.

Therefore, switch to leader-with-lease election mechanism as provided by
the client-go package, which seems to be more reliable at this point.

Other changes:
  - fix incorrect error reporting on metrics server shutdown
  - fix default_irq_smp_affinity e2e test for systems with less then 4
    CPUs
  - go mod tidy
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 21, 2021

@jmencak: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

Switch to client-go leader-with-lease election.

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-ci openshift-ci bot requested review from kpouget and zvonkok June 21, 2021 07:59
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 21, 2021
@jmencak jmencak changed the title Switch to client-go leader-with-lease election. Bug 1958885: Switch to client-go leader-with-lease election. Jun 21, 2021
@openshift-ci openshift-ci bot added the bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. label Jun 21, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 21, 2021

@jmencak: This pull request references Bugzilla bug 1958885, which is invalid:

  • expected the bug to target the "4.7.z" release, but it targets "---" instead
  • expected Bugzilla bug 1958885 to depend on a bug targeting a release in 4.8.0 and in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE), but no dependents were found

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1958885: Switch to client-go leader-with-lease election.

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-ci openshift-ci bot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Jun 21, 2021
@jmencak
Copy link
Contributor Author

jmencak commented Jun 21, 2021

/bugzilla refresh

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 21, 2021

@jmencak: This pull request references Bugzilla bug 1958885, which is invalid:

  • expected the bug to target the "4.7.z" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/bugzilla 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 kubernetes/test-infra repository.

@jmencak
Copy link
Contributor Author

jmencak commented Jun 21, 2021

/bugzilla refresh

@openshift-ci openshift-ci bot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jun 21, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 21, 2021

@jmencak: This pull request references Bugzilla bug 1958885, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.z) matches configured target release for branch (4.7.z)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
  • dependent bug Bugzilla bug 1962219 is in the state VERIFIED, which is one of the valid states (VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE))
  • dependent Bugzilla bug 1962219 targets the "4.8.0" release, which is one of the valid target releases: 4.8.0
  • bug has dependents

No GitHub users were found matching the public email listed for the QA contact in Bugzilla (skordas@redhat.com), skipping review request.

In response to this:

/bugzilla 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 kubernetes/test-infra repository.

@kpouget
Copy link

kpouget commented Jun 21, 2021

thanks @jmencak ,
\lgtm

@kpouget
Copy link

kpouget commented Jun 21, 2021

thanks @jmencak ,
\lgtm

/lgtm

:|

/joke

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 21, 2021

@kpouget: Did you hear about the runner who was criticized? He just took it in stride

In response to this:

thanks @jmencak ,
\lgtm

/lgtm

:|

/joke

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-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 21, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 21, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jmencak, kpouget

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

@bparees bparees added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Jun 23, 2021
@openshift-merge-robot openshift-merge-robot merged commit d546b54 into openshift:release-4.7 Jun 23, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 23, 2021

@jmencak: All pull requests linked via external trackers have merged:

Bugzilla bug 1958885 has been moved to the MODIFIED state.

In response to this:

Bug 1958885: Switch to client-go leader-with-lease election.

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.

@jmencak jmencak deleted the 4.7-leader-election-go-client branch October 24, 2021 16:04
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. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. 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