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>
(cherry picked from commit e039172)
  • Loading branch information
smira committed Apr 15, 2021
1 parent 5ce00af commit 948ae7b
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 948ae7b

Please sign in to comment.