-
Notifications
You must be signed in to change notification settings - Fork 59
configurable timer for lease #75
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
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: danielzhanghl The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @danielzhanghl! |
Hi @danielzhanghl. Thanks for your PR. I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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 signed it |
1 similar comment
I signed it |
Hi @danielzhanghl can you describe the problem you're facing with the current lease settings? /assign @Jiawei0227 |
the problem is in this ticket, in some environment, the etcd is not that good, leader selection timer need to be configurable to adopt that, as in other K8S component. |
@@ -43,13 +43,46 @@ const ( | |||
|
|||
DefaultHealthCheckTimeout = 20 * time.Second | |||
|
|||
nameLeaseDuration = "LEASEDURATION" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change to
LEADER_ELECTION_LEASE_DURATION
LEADER_ELECTION_RENEW_DEADLINE
LEADER_ELECTION_RETRY_PERIOD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name is modeled from previous const, like "defaultLeaseDuration", would keep it as no change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These variables are setting from OS environment. So we better be explicitly state what they are used for. Otherwise it can be confused for things like "RETRYPERIOD"
nameLeaseDuration = "LEASEDURATION" | ||
nameRenewDeadline = "RENEWDEADLINE" | ||
nameRetryPeriod = "RETRYPERIOD" | ||
nameHealthCheckTimeout = "HEALTHCHECKTIMEOUT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this being used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they are used in getTimer(...), except nameHealthCheckTimeout, which is for future and keep the coding style same in this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry what do you mean for future? When will we use it? Can you share some more details?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HealthCheckTimeout(DefaultHealthCheckTimeout = 20 * time.Second) is hard coded right now,
if some body think that also need to be configurable, just change the hard coded value to function call getTimer(nameHealthCheckTimeout), but this is not the issue I met so did not make that change in this package.
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Rotten issues close after 30d of inactivity. Send feedback to sig-contributor-experience at kubernetes/community. |
@fejta-bot: Closed this PR. In response to this:
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. |
What type of PR is this?
What this PR does / why we need it:
this PR is to make the lease related timer configurable from environment variable.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: