Skip to content
This repository was archived by the owner on Jun 23, 2022. It is now read-only.

*: add --max-retry flag to kube-client-agent - #25

Merged
abhinavdahiya merged 1 commit into
coreos:masterfrom
hexfusion:add_retry
Apr 4, 2019
Merged

abhinavdahiya merged 1 commit into
coreos:masterfrom
hexfusion:add_retry

Conversation

@hexfusion

@hexfusion hexfusion commented Apr 3, 2019 •

Copy link
Copy Markdown
Contributor

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-retry to 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

Comment thread pkg/certagent/agent.go Resolved
@hexfusion
hexfusion force-pushed the add_retry branch 2 times, most recently from 23ee0b5 to 9d5f068 Compare April 3, 2019 18:53
@hexfusion

Copy link
Copy Markdown
Contributor Author

@abhinavdahiya updated

Comment thread pkg/certagent/agent.go Resolved
Comment thread pkg/certagent/agent.go
backoff := wait.Backoff{
Steps: c.config.MaxRetry,
Duration: 10 * time.Second,
Factor: 0.0,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • whats the behavior at 0?
  • why not non-zero value?

@hexfusion hexfusion Apr 4, 2019 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@abhinavdahiya

Copy link
Copy Markdown
Contributor

LGTM

@wking

wking commented Apr 5, 2019

Copy link
Copy Markdown
Contributor

Rerolled without a knob and with "wait forever" semantics in #27.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants