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

🏃clusterctl: add retries to clustectl move #2776

Merged

Conversation

fabriziopandini
Copy link
Member

What this PR does / why we need it:
This PR add some more retries to clusterctl. More specifically

  • adds retries for handling temporary connection problems with clusters
  • adds retries for all the read/write operations triggered clusterctl move

/assign @vincepri
/assign @wfernandes

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 25, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

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 Mar 25, 2020
cmd/clusterctl/client/cluster/client.go Outdated Show resolved Hide resolved
cmd/clusterctl/client/cluster/mover_test.go Outdated Show resolved Hide resolved
Comment on lines +235 to +257
func newConnectBackoff() wait.Backoff {
// Return a exponential backoff configuration which returns durations for a total time of ~15s.
// Example: 0, .25s, .6s, 1.2, 2.1s, 3.4s, 5.5s, 8s, 12s
// Jitter is added as a random fraction of the duration multiplied by the jitter factor.
return wait.Backoff{
Duration: 250 * time.Millisecond,
Factor: 1.5,
Steps: 9,
Jitter: 0.1,
}
}

// newReadBackoff creates a new API Machinery backoff parameter set suitable for use with clusterctl read operations.
func newReadBackoff() wait.Backoff {
// Return a exponential backoff configuration which returns durations for a total time of ~15s.
// Example: 0, .25s, .6s, 1.2, 2.1s, 3.4s, 5.5s, 8s, 12s
// Jitter is added as a random fraction of the duration multiplied by the jitter factor.
return wait.Backoff{
Duration: 250 * time.Millisecond,
Factor: 1.5,
Steps: 9,
Jitter: 0.1,
}
Copy link
Member

Choose a reason for hiding this comment

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

these two seem to have effectively the same values, is that intended?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, I do expect some tuning here.

cmd/clusterctl/client/cluster/mover.go Show resolved Hide resolved
cmd/clusterctl/client/cluster/objectgraph.go Outdated Show resolved Hide resolved
cmd/clusterctl/client/cluster/proxy.go Outdated Show resolved Hide resolved
cmd/clusterctl/client/cluster/proxy.go Outdated Show resolved Hide resolved
cmd/clusterctl/client/cluster/proxy.go Outdated Show resolved Hide resolved
@fabriziopandini
Copy link
Member Author

@vincepri comment addressed (in a separated commit for easier review)

@vincepri
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 25, 2020
@fabriziopandini
Copy link
Member Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 25, 2020
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 25, 2020
@fabriziopandini
Copy link
Member Author

/hold cancel
squashed

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 25, 2020
@vincepri
Copy link
Member

/lgtm

@vincepri
Copy link
Member

/milestone v0.3.3

@k8s-ci-robot k8s-ci-robot added this to the v0.3.3 milestone Mar 25, 2020
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 25, 2020
@k8s-ci-robot k8s-ci-robot merged commit 2b2bfb9 into kubernetes-sigs:master Mar 25, 2020
@fabriziopandini fabriziopandini deleted the clusterctl-add-retries branch April 3, 2020 10:40
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants