From 075a4087d746ad31173be48f218eb014c336dc59 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 13 Jul 2021 16:46:57 +0200 Subject: [PATCH] e2e: mark "etcdserver: request timed out" errors as retryable There are regular CI failures where etcdserver times out. These errors seem not to get caught by any of the existing error comparing. Matching the error by string should prevent temporary etcdserver issues now too. Updates: #2218 Closes: #1969 Signed-off-by: Niels de Vos --- e2e/errors.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/e2e/errors.go b/e2e/errors.go index 04d4e7bc8..b398cfba0 100644 --- a/e2e/errors.go +++ b/e2e/errors.go @@ -17,6 +17,8 @@ limitations under the License. package e2e import ( + "strings" + apierrors "k8s.io/apimachinery/pkg/api/errors" utilnet "k8s.io/apimachinery/pkg/util/net" ) @@ -32,5 +34,11 @@ func isRetryableAPIError(err error) bool { if _, shouldRetry := apierrors.SuggestsClientDelay(err); shouldRetry { return true } + + // "etcdserver: request timed out" does not seem to match the timeout errors above + if strings.HasSuffix(err.Error(), "etcdserver: request timed out") { + return true + } + return false }