mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
kubeadm: increase timeouts in the etcd client
- Extend the exponential backoff for add/remove/... retry to 11 steps ~=106 seconds. From experiments for 3 and more members the race can take more that ~=26 seconds. - Increase the dialTimeout for client creation to 40 seconds. 20 seconds seems racy for 3 and more members.
This commit is contained in:
parent
5e0c0779a1
commit
a027c379f7
@ -42,7 +42,7 @@ const etcdTimeout = 2 * time.Second
|
|||||||
|
|
||||||
// Exponential backoff for etcd operations
|
// Exponential backoff for etcd operations
|
||||||
var etcdBackoff = wait.Backoff{
|
var etcdBackoff = wait.Backoff{
|
||||||
Steps: 9,
|
Steps: 11,
|
||||||
Duration: 50 * time.Millisecond,
|
Duration: 50 * time.Millisecond,
|
||||||
Factor: 2.0,
|
Factor: 2.0,
|
||||||
Jitter: 0.1,
|
Jitter: 0.1,
|
||||||
@ -128,9 +128,9 @@ func NewFromCluster(client clientset.Interface, certificatesDir string) (*Client
|
|||||||
}
|
}
|
||||||
|
|
||||||
// dialTimeout is the timeout for failing to establish a connection.
|
// dialTimeout is the timeout for failing to establish a connection.
|
||||||
// It is set to 20 seconds as times shorter than that will cause TLS connections to fail
|
// It is set to >20 seconds as times shorter than that will cause TLS connections to fail
|
||||||
// on heavily loaded arm64 CPUs (issue #64649)
|
// on heavily loaded arm64 CPUs (issue #64649)
|
||||||
const dialTimeout = 20 * time.Second
|
const dialTimeout = 40 * time.Second
|
||||||
|
|
||||||
// Sync synchronizes client's endpoints with the known endpoints from the etcd membership.
|
// Sync synchronizes client's endpoints with the known endpoints from the etcd membership.
|
||||||
func (c *Client) Sync() error {
|
func (c *Client) Sync() error {
|
||||||
|
Loading…
Reference in New Issue
Block a user