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

Restore ProbeForever behavior of probing first before sleeping #175

Merged
merged 2 commits into from
May 30, 2024

Conversation

Fricounet
Copy link
Contributor

@Fricounet Fricounet commented May 30, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

The previous beheavior of ProbeForever was to try a probe and then sleep for the probeInterval duration. When it was modified to use a time.Ticker instead of a sleep in #149, it changed the behavior to wait the probeInterval first and then do the probe. This PR restores the previous behavior by running the probe first because it is causing issues when trying to start some of the sidecars (kubernetes-csi/external-attacher#561). And in general, it slows down the startup of the sidecars by at least 1s, even when the plugin is already ready to accept connections.
Based on https://stackoverflow.com/a/54752803.

Which issue(s) this PR fixes:

Fixes #177

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Restored the previous behavior of `ProbeForever` to do a probe first before sleeping.

Fricounet added 2 commits May 30, 2024 12:32
The previous beheavior of ProbeForever was to try a probe and then sleep for the `probeInterval` duration. When it was modified to use a `time.Ticker` instead of a sleep, it changed the behavior to wait the `probeInterval` first and then do the probe. This commit restore the previous behavior by running the probe first. Based on https://stackoverflow.com/a/54752803.
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 30, 2024
@k8s-ci-robot k8s-ci-robot requested review from andyzhangx and pohly May 30, 2024 10:41
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 30, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @Fricounet. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 30, 2024
@jsafrane
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 30, 2024
@jsafrane
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 30, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Fricounet, jsafrane

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 30, 2024
@k8s-ci-robot k8s-ci-robot merged commit e2e2abb into kubernetes-csi:master May 30, 2024
3 checks passed
@jsafrane
Copy link
Contributor

I've tagged v0.18.1, I (or dependabot) will update all sidecars.

@Fricounet Fricounet deleted the fricounet/probe-first branch May 31, 2024 08:25
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ProbeForever has 1 second delay
3 participants