Skip to content

Commit

Permalink
fix: ignore EOF errors from Kubernetes API when converting control plane
Browse files Browse the repository at this point in the history
During the conversion process, API server goes down, so we can see lots
of network errors including EOF.

Fixes #3404

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
  • Loading branch information
smira authored and talos-bot committed Apr 1, 2021
1 parent 7bcb91a commit e039172
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/cluster/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package kubernetes

import (
"errors"
"io"
"net"
"syscall"

Expand All @@ -18,6 +19,10 @@ func retryableError(err error) bool {
return true
}

if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) {
return true
}

netErr := &net.OpError{}

if errors.As(err, &netErr) {
Expand Down

0 comments on commit e039172

Please sign in to comment.