Skip to content

Add exponential backoff retries for getting Node from API server logic#1990

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:masterfrom
hungnguyen243:getNodeAPIFix
Mar 17, 2025
Merged

Add exponential backoff retries for getting Node from API server logic#1990
k8s-ci-robot merged 1 commit into
kubernetes-sigs:masterfrom
hungnguyen243:getNodeAPIFix

Conversation

@hungnguyen243
Copy link
Copy Markdown
Contributor

@hungnguyen243 hungnguyen243 commented Mar 13, 2025

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change

/kind bug

/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:
Add exponential backoff retries for getting Node from API server logic in GetDataCacheCountFromNodeLabel(). After we exceed the retries and still cannot get the Node object, the error will be surfaced for a driver restart (instead of the current logic that allows NodeStageVolume to happen and another error to surface misleadingly).
This is needed since we may hit connectivity issue with API server during driver startup, causing the existing code to fail to get the Node object with just one attempt.
Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Add exponential backoff retries for getting Node from API server logic

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 13, 2025
@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 Mar 13, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @hungnguyen243. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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.

Details

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 Mar 13, 2025
@hungnguyen243
Copy link
Copy Markdown
Contributor Author

/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 Mar 13, 2025
Comment thread cmd/gce-pd-csi-driver/main.go
@hungnguyen243
Copy link
Copy Markdown
Contributor Author

/retest-required

Comment thread pkg/gce-pd-csi-driver/cache.go Outdated
Comment thread pkg/gce-pd-csi-driver/cache.go Outdated
@hungnguyen243
Copy link
Copy Markdown
Contributor Author

/retest-required

1 similar comment
@hungnguyen243
Copy link
Copy Markdown
Contributor Author

/retest-required

@sunnylovestiramisu
Copy link
Copy Markdown
Contributor

/retest-required

@sunnylovestiramisu
Copy link
Copy Markdown
Contributor

/retest-required

@hungnguyen243
Copy link
Copy Markdown
Contributor Author

/retest-required

@Sneha-at
Copy link
Copy Markdown
Contributor

/cherry-pick release-1.17

@k8s-infra-cherrypick-robot
Copy link
Copy Markdown

@Sneha-at: once the present PR merges, I will cherry-pick it on top of release-1.17 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-1.17

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
Copy link
Copy Markdown
Contributor

k8s-ci-robot commented Mar 15, 2025

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

Test name Commit Details Required Rerun command
pull-gcp-compute-persistent-disk-csi-driver-e2e-windows-2019 7e0a35b link false /test pull-gcp-compute-persistent-disk-csi-driver-e2e-windows-2019

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

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

@sunnylovestiramisu
Copy link
Copy Markdown
Contributor

/test pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

@sunnylovestiramisu
Copy link
Copy Markdown
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 Mar 17, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hungnguyen243, sunnylovestiramisu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 Mar 17, 2025
@k8s-ci-robot k8s-ci-robot merged commit ba89880 into kubernetes-sigs:master Mar 17, 2025
@k8s-infra-cherrypick-robot
Copy link
Copy Markdown

@Sneha-at: new pull request created: #1995

Details

In response to this:

/cherry-pick release-1.17

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.

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.

6 participants