Skip to content

Commit a027c37

Browse files
committed
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.
1 parent 5e0c077 commit a027c37

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/kubeadm/app/util/etcd/etcd.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const etcdTimeout = 2 * time.Second
4242

4343
// Exponential backoff for etcd operations
4444
var etcdBackoff = wait.Backoff{
45-
Steps: 9,
45+
Steps: 11,
4646
Duration: 50 * time.Millisecond,
4747
Factor: 2.0,
4848
Jitter: 0.1,
@@ -128,9 +128,9 @@ func NewFromCluster(client clientset.Interface, certificatesDir string) (*Client
128128
}
129129

130130
// dialTimeout is the timeout for failing to establish a connection.
131-
// It is set to 20 seconds as times shorter than that will cause TLS connections to fail
131+
// It is set to >20 seconds as times shorter than that will cause TLS connections to fail
132132
// on heavily loaded arm64 CPUs (issue #64649)
133-
const dialTimeout = 20 * time.Second
133+
const dialTimeout = 40 * time.Second
134134

135135
// Sync synchronizes client's endpoints with the known endpoints from the etcd membership.
136136
func (c *Client) Sync() error {

0 commit comments

Comments
 (0)