This repository was archived by the owner on Jun 23, 2022. It is now read-only.
Repository navigation
*: add --max-retry flag to kube-client-agent - #25
Merged
Merged
Conversation
hexfusion
force-pushed
the
add_retry
branch
2 times, most recently
from
April 3, 2019 18:53
23ee0b5 to
9d5f068
Compare
Contributor
Author
|
@abhinavdahiya updated |
| backoff := wait.Backoff{ | ||
| Steps: c.config.MaxRetry, | ||
| Duration: 10 * time.Second, | ||
| Factor: 0.0, |
Contributor
There was a problem hiding this comment.
- whats the behavior at 0?
- why not non-zero value?
Contributor
Author
There was a problem hiding this comment.
Well my hope was to be able to know how much time the wait operation would take. By using 0.0 we are not multiplying so if we have 3 steps or --max-retry=3 this is pretty simple.
10 seconds initial wait + ( 10 * Steps) = 40 seconds.
I understand that I am not using the Exponential part of this, maybe it was silly to try to keep so simple?
Contributor
Author
There was a problem hiding this comment.
Signed-off-by: Sam Batschelet <[email protected]>
Contributor
|
LGTM |
Contributor
|
Rerolled without a knob and with "wait forever" semantics in #27. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, if the server can not respond because let's say the container restarted or network partition client will exit 1. In some cases, we do not want this to be fatal and instead retry.
This PR adds a flag
--max-retryto kube-client-agent which is disabled by default. We will sleep for 10 seconds and retry N times. If we still have a failure at that point we exit and report the error./cc @abhinavdahiya
ref: https://bugzilla.redhat.com/show_bug.cgi?id=1694169