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 1864352: Add leader election mechanism to release 4.5 #664

Conversation

elmiko
Copy link
Contributor

@elmiko elmiko commented Aug 3, 2020

This change brings in several cherry picks for the leader election mechanisms for all the controllers in this repo.

3d3b575
c939c92
5fdd6ef
48d9cce
fe7cbdc
495f3e7
0a56184
3f12419
a52a7ec
91251df
303f931
644ed9a
d6ec8b6
a72ad43
fda33fd

because this merge request will change the way that the controllers are deployed (adding leader election command line flags), we should make sure all the providers have the change in place first.

aws: openshift/cluster-api-provider-aws#342
azure: openshift/cluster-api-provider-azure#156
baremetal: openshift/cluster-api-provider-baremetal#106
gcp: openshift/cluster-api-provider-gcp#114
openstack: openshift/cluster-api-provider-openstack#117
ovirt:
vsphere: #664

Using leader election by default will add stronger guarantees than we have today that only one controller is running at a time to protect against edge cases where the deployment replica could be increased or upgrades with permissive maxSurge.

Relevant provider PRs:

- openshift/cluster-api-provider-gcp#85
- openshift/cluster-api-provider-aws#315
- openshift/cluster-api-provider-azure#122
- openshift/cluster-api-provider-openstack#108
- openshift/cluster-api-provider-baremetal#81
- openshift/cluster-api-provider-ovirt#55
- openshift#571
The machine-api-controller components are refreshing their lease more
than all other components combined. Bringing this to 90s each, will
decrease etcd writes at idle.
The machine-api-controller components are refreshing their lease more
than all other components combined. Bringing this to 90s each, will
decrease etcd writes at idle.
The machine-api-controller components are refreshing their lease more
than all other components combined. Bringing this to 90s each, will
decrease etcd writes at idle.
The machine-api-controller components are refreshing their lease more
than all other components combined. Bringing this to 90s each, will
decrease etcd writes at idle.
Enforce this value in MAO deployment will ensure the value won't
be overritten by changed CLI defaults in the future.
@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. labels Aug 3, 2020
@openshift-ci-robot
Copy link
Contributor

@elmiko: This pull request references Bugzilla bug 1864352, which is invalid:

  • expected dependent Bugzilla bug 1861896 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), but it is NEW 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:

Bug 1864352: Add leader election mechanism

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-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Aug 3, 2020
@openshift-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@elmiko
Copy link
Contributor Author

elmiko commented Aug 3, 2020

i am still testing this out, just wanted to get the cherry-picks in place.

@elmiko
Copy link
Contributor Author

elmiko commented Aug 10, 2020

i've tested the mao, mhc, and machineset components. still working on a test for vsphere.

@elmiko
Copy link
Contributor Author

elmiko commented Aug 11, 2020

we also need to make sure we don't break the baremetal, ovirt, and openstack providers by merging this as it adds the leader election command line flags to the deployments for the provider controllers.

@openshift-ci-robot
Copy link
Contributor

@elmiko: This pull request references Bugzilla bug 1864352, which is invalid:

  • expected dependent Bugzilla bug 1861896 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), but it is CLOSED (CURRENTRELEASE) 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:

Bug 1864352: Add leader election mechanism

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.

@elmiko
Copy link
Contributor Author

elmiko commented Aug 12, 2020

i would like to make sure we include these commits once they have landed in the master branch, #675

Prevent machine controllers from writing in etcd at idle too often
by setting 30s retry and 90s deadline on all renewals.
BZ 1858403
Prevent machine controllers from writing in etcd at idle too often
by setting 30s retry and 90s deadline on all renewals.
BZ 1858403
Prevent machine controllers from writing in etcd at idle too often
by setting 60s retry and delay on all renewals.
BZ 1858403
Prevent machine controllers from writing in etcd at idle too often
by setting 60s retry and delay on all renewals.
BZ 1858403
@openshift-ci-robot
Copy link
Contributor

@elmiko: This pull request references Bugzilla bug 1864352, which is invalid:

  • expected dependent Bugzilla bug 1861896 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), but it is POST 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:

Bug 1864352: Add leader election mechanism

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.

1 similar comment
@openshift-ci-robot
Copy link
Contributor

@elmiko: This pull request references Bugzilla bug 1864352, which is invalid:

  • expected dependent Bugzilla bug 1861896 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), but it is POST 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:

Bug 1864352: Add leader election mechanism

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.

@elmiko
Copy link
Contributor Author

elmiko commented Aug 27, 2020

/retitle Bug 1864352: Add leader election mechanism to release 4.5

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Sep 8, 2020
@openshift-ci-robot
Copy link
Contributor

@elmiko: This pull request references Bugzilla bug 1864352, which is valid. 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.5.z) matches configured target release for branch (4.5.z)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
  • dependent bug Bugzilla bug 1861896 is in the state VERIFIED, which is one of the valid states (VERIFIED, RELEASE_PENDING, CLOSED (ERRATA))
  • dependent Bugzilla bug 1861896 targets the "4.6.0" release, which is one of the valid target releases: 4.6.0, 4.6.z
  • bug has dependents

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.

@elmiko
Copy link
Contributor Author

elmiko commented Oct 1, 2020

not quite sure why the unit tests are failing now, but i do see similar failures locally. it looks like something related to the machinehealthcheck tests, @JoelSpeed any thoughts?

@elmiko
Copy link
Contributor Author

elmiko commented Oct 1, 2020

/test unit

@elmiko
Copy link
Contributor Author

elmiko commented Oct 1, 2020

seems like the unit sorted itself out, i think it had to do with the container setup and not the test themselves.
/retest

Copy link
Contributor

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

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

/approve

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed

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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 2, 2020
@Danil-Grigorev
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 5, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@elmiko
Copy link
Contributor Author

elmiko commented Oct 6, 2020

@JoelSpeed any idea how we get the cherry-pick approval to make tide happy?

@JoelSpeed
Copy link
Contributor

@JoelSpeed any idea how we get the cherry-pick approval to make tide happy?

Patch manager should see that this PR is ready when they start the next merge window (Wed-Fri) for 4.5.z, then give it the label as appropriate. As this is marked as high it should be relatively high on their list to look at this week so will hopefully merge in the next few days.

From our side, our job is done now, we just wait for the patch manager.

@mfojtik mfojtik added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Oct 7, 2020
@openshift-merge-robot openshift-merge-robot merged commit 42ff9e6 into openshift:release-4.5 Oct 7, 2020
@openshift-ci-robot
Copy link
Contributor

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

Bugzilla bug 1864352 has been moved to the MODIFIED state.

In response to this:

Bug 1864352: Add leader election mechanism to release 4.5

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.

andymcc added a commit to andymcc/cluster-api-provider-libvirt that referenced this pull request Oct 12, 2020
This cherry-picks the fix from master/4.6 and integrates with:
openshift/machine-api-operator#664

Adding 3 new cli arguments for configuring leader elections:
-leader-elect
-leader-elect-lease-duration int
-leader-elect-resource-namespace string

Using leader election will add stronger guarantees than we have today
that only one controller is running at a time to protect against edge
cases where the deployment replica could be increased or upgrades with
permissive maxSurge.

(cherry picked from commit 5ccc992)
andymcc added a commit to andymcc/cluster-api-provider-libvirt that referenced this pull request Oct 12, 2020
This cherry-picks the fix from master/4.6 and integrates with:
openshift/machine-api-operator#664

Adding 3 new cli arguments for configuring leader elections:
-leader-elect
-leader-elect-lease-duration int
-leader-elect-resource-namespace string

Using leader election will add stronger guarantees than we have today
that only one controller is running at a time to protect against edge
cases where the deployment replica could be increased or upgrades with
permissive maxSurge.

(cherry picked from commit 5ccc992)
@elmiko elmiko deleted the add-leader-election/release-4.5 branch November 5, 2020 17:38
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.

7 participants