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 <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2021-07-13 16:46:57 +02:00 committed by mergify[bot]
parent f210d5758b
commit 075a4087d7

View File

@ -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
}