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 1989246: use new default leader election values to handle apiserver rollout on SNO #1175

Conversation

creydr
Copy link
Member

@creydr creydr commented Aug 4, 2021

In case of CNO gets deployed on SNO, it can run into leader election timeouts during an api server rollout (as only one api server is available and it doesn't restart fast enough yet).
Therefor the default values for leader election have been updated (openshift/library-go#1104) to the recommended values.

This PR updates the version of the openshift/library-go library to use these new values and being able to handle a 60 seconds downtime of the api server on SNO.

How to reproduce / validate:

  1. Start a SNO cluster with this patch (e.g. via clusterbot launch 4.9.0-0.nightly,openshift/cluster-network-operator#1175 aws,single-node)
  2. Trigger a apiserver rollout (e.g. via k patch kubeapiserver/cluster --type merge -p '{"spec":{"forceRedeploymentReason":"something"}}')
  3. Check the logs from CNO controller pod during the update
  4. Validate the pod did not get restarted cause it lost the lease (e.g. check no previous logs are available / doesn't contain leaderelection lost

Special notes for reviewers:
The important file is vendor/github.com/openshift/library-go/pkg/config/leaderelection/leaderelection.go, which uses the new recommended values:

if ret.LeaseDuration.Duration == 0 {
ret.LeaseDuration.Duration = 137 * time.Second
}
if ret.RenewDeadline.Duration == 0 {
// this gives 107/26=4 retries and allows for 137-107=30 seconds of clock skew
// if the kube-apiserver is unavailable for 60s starting just before t=26 (the first renew),
// then we will retry on 26s intervals until t=104 (kube-apiserver came back up at 86), and there will
// be 33 seconds of extra time before the lease is lost.
ret.RenewDeadline.Duration = 107 * time.Second
}
if ret.RetryPeriod.Duration == 0 {
ret.RetryPeriod.Duration = 26 * time.Second
}

@openshift-ci openshift-ci bot 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 4, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 4, 2021

@creydr: This pull request references Bugzilla bug 1989246, 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.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.9.0) matches configured target release for branch (4.9.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @zhaozhanqi

In response to this:

Bug 1989246: use new default leader election values to handle apiserver rollout on SNO

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/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Aug 4, 2021
@openshift-ci openshift-ci bot requested a review from zhaozhanqi August 4, 2021 10:28
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 4, 2021

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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 4, 2021

@creydr: This pull request references Bugzilla bug 1989246, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.9.0) matches configured target release for branch (4.9.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @zhaozhanqi

In response to this:

Bug 1989246: use new default leader election values to handle apiserver rollout on SNO

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.

@creydr
Copy link
Member Author

creydr commented Aug 4, 2021

/test

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 4, 2021

@creydr: The /test command needs one or more targets.
The following commands are available to trigger required jobs:

  • /test e2e-agnostic-upgrade
  • /test e2e-aws-ovn-windows
  • /test e2e-aws-sdn-multi
  • /test e2e-gcp
  • /test e2e-gcp-ovn
  • /test e2e-metal-ipi-ovn-ipv6
  • /test images
  • /test unit
  • /test verify

The following commands are available to trigger optional jobs:

  • /test e2e-azure-ovn
  • /test e2e-azure-ovn-dualstack
  • /test e2e-gcp-ovn-upgrade
  • /test e2e-metal-ipi-ovn-ipv6-ipsec
  • /test e2e-openstack
  • /test e2e-openstack-kuryr
  • /test e2e-openstack-ovn
  • /test e2e-ovn-hybrid-step-registry
  • /test e2e-ovn-ipsec-step-registry
  • /test e2e-ovn-step-registry
  • /test e2e-vsphere-ovn
  • /test e2e-vsphere-windows

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-cluster-network-operator-master-e2e-agnostic-upgrade
  • pull-ci-openshift-cluster-network-operator-master-e2e-aws-ovn-windows
  • pull-ci-openshift-cluster-network-operator-master-e2e-aws-sdn-multi
  • pull-ci-openshift-cluster-network-operator-master-e2e-azure-ovn
  • pull-ci-openshift-cluster-network-operator-master-e2e-gcp
  • pull-ci-openshift-cluster-network-operator-master-e2e-gcp-ovn
  • pull-ci-openshift-cluster-network-operator-master-e2e-gcp-ovn-upgrade
  • pull-ci-openshift-cluster-network-operator-master-e2e-metal-ipi-ovn-ipv6
  • pull-ci-openshift-cluster-network-operator-master-e2e-metal-ipi-ovn-ipv6-ipsec
  • pull-ci-openshift-cluster-network-operator-master-e2e-openstack-ovn
  • pull-ci-openshift-cluster-network-operator-master-e2e-ovn-hybrid-step-registry
  • pull-ci-openshift-cluster-network-operator-master-e2e-ovn-ipsec-step-registry
  • pull-ci-openshift-cluster-network-operator-master-e2e-ovn-step-registry
  • pull-ci-openshift-cluster-network-operator-master-e2e-vsphere-ovn
  • pull-ci-openshift-cluster-network-operator-master-e2e-vsphere-windows
  • pull-ci-openshift-cluster-network-operator-master-images
  • pull-ci-openshift-cluster-network-operator-master-unit
  • pull-ci-openshift-cluster-network-operator-master-verify

In response to this:

/test

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.

@creydr
Copy link
Member Author

creydr commented Aug 4, 2021

/test all

@creydr
Copy link
Member Author

creydr commented Aug 5, 2021

/retest

@creydr
Copy link
Member Author

creydr commented Aug 5, 2021

/retest-required

@creydr creydr marked this pull request as ready for review August 6, 2021 07:19
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 6, 2021
@creydr
Copy link
Member Author

creydr commented Aug 6, 2021

@zhaozhanqi, @alexanderConstantinescu, @trozet could you please review this PR?
Thanks

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 6, 2021

@creydr: This pull request references Bugzilla bug 1989246, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.9.0) matches configured target release for branch (4.9.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @zhaozhanqi

In response to this:

Bug 1989246: use new default leader election values to handle apiserver rollout on SNO

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.

@creydr
Copy link
Member Author

creydr commented Aug 6, 2021

/retest

@creydr
Copy link
Member Author

creydr commented Aug 6, 2021

/retest-required

@creydr
Copy link
Member Author

creydr commented Aug 8, 2021

/retest

@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 8, 2021
@creydr creydr force-pushed the use-new-default-leader-election-values-to-handle-api-server-rollout-on-sno branch from 7ee586b to 048145f Compare August 9, 2021 06:53
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 9, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 9, 2021

@creydr: An error was encountered searching for bug 1989246 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. could not unmarshal response body: invalid character '<' looking for beginning of value

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1989246: use new default leader election values to handle apiserver rollout on SNO

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.

@creydr
Copy link
Member Author

creydr commented Aug 9, 2021

/bugzilla refresh

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 9, 2021

@creydr: An error was encountered searching for bug 1989246 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. could not unmarshal response body: invalid character '<' looking for beginning of value

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

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.

@petr-muller
Copy link
Member

/bugzilla refresh

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 9, 2021

@petr-muller: An error was encountered searching for bug 1989246 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details.

Full error message. could not unmarshal response body: invalid character '<' looking for beginning of value

Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

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.

@creydr
Copy link
Member Author

creydr commented Aug 9, 2021

/retest-required

Signed-off-by: Christoph Stäbler <cstabler@redhat.com>
@creydr creydr force-pushed the use-new-default-leader-election-values-to-handle-api-server-rollout-on-sno branch from 1c095ca to 4bf24b6 Compare August 12, 2021 13:46
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 12, 2021
@creydr
Copy link
Member Author

creydr commented Aug 12, 2021

/retest

3 similar comments
@creydr
Copy link
Member Author

creydr commented Aug 12, 2021

/retest

@creydr
Copy link
Member Author

creydr commented Aug 12, 2021

/retest

@creydr
Copy link
Member Author

creydr commented Aug 13, 2021

/retest

@creydr
Copy link
Member Author

creydr commented Aug 13, 2021

/retest-required

@creydr
Copy link
Member Author

creydr commented Aug 14, 2021

/retest

1 similar comment
@creydr
Copy link
Member Author

creydr commented Aug 15, 2021

/retest

@abhat
Copy link
Contributor

abhat commented Aug 16, 2021

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 16, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 16, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhat, alexanderConstantinescu, creydr

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 Aug 16, 2021
@creydr
Copy link
Member Author

creydr commented Aug 17, 2021

/retest

@creydr
Copy link
Member Author

creydr commented Aug 17, 2021

/retest-required

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 17, 2021

@creydr: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-openstack-ovn 4bf24b6 link /test e2e-openstack-ovn
ci/prow/e2e-gcp-ovn-upgrade 4bf24b6 link /test e2e-gcp-ovn-upgrade

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

@creydr
Copy link
Member Author

creydr commented Aug 17, 2021

/retest-required

@openshift-bot
Copy link
Contributor

/retest-required

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

8 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-ci openshift-ci bot merged commit 0084395 into openshift:master Aug 17, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 17, 2021

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

Bugzilla bug 1989246 has been moved to the MODIFIED state.

In response to this:

Bug 1989246: use new default leader election values to handle apiserver rollout on SNO

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.

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. 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

7 participants