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

List and Get retry logic #227

Merged
merged 1 commit into from
Nov 20, 2018

Conversation

cjellick
Copy link

@cjellick cjellick commented Nov 20, 2018

Some cloud provider k8s APIs have random timeouts on listing and getting.
This change introduces a retry on lists and gets

@cjellick cjellick force-pushed the if-at-first-you-dont-succeed branch from 03d294e to cb101c6 Compare November 20, 2018 04:23
@cjellick
Copy link
Author

rancher/rancher#16598

for i := 0; i < 3; i++ {
req := s.common(namespace, k8sClient.Get())
start := time.Now()
err = req.Do().Into(resultList)
Copy link
Contributor

Choose a reason for hiding this comment

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

you should (re)initialize resultList here to avoid odd behavior.

Some cloud provider k8s APIs have random timeouts on listing and getting.
This change introduces a retry on lists and gets.
@cjellick cjellick force-pushed the if-at-first-you-dont-succeed branch from cb101c6 to bf6cd6e Compare November 20, 2018 17:15
@cjellick cjellick merged commit 63af681 into rancher:master Nov 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants