mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
e2e: retry on "connect: connection refused" errors
Sometimes there are failures in the e2e suite when connecting to the etcdserver fails. The following error was caught: INFO: Error getting pvc "rbd-pvc" in namespace "rbd-1318": Get "https://192.168.39.222:8443/api/v1/namespaces/rbd-1318/persistentvolumeclaims/rbd-pvc": dial tcp 192.168.39.222:8443: connect: connection refused FAIL: failed to create PVC with error failed to get pvc: Get "https://192.168.39.222:8443/api/v1/namespaces/rbd-1318/persistentvolumeclaims/rbd-pvc": dial tcp 192.168.39.222:8443: connect: connection refused If etcdserver was only briefly unavailable, one or more retries might be sufficient to have the test pass. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
d85304c7c2
commit
5c016b4b94
@ -26,7 +26,8 @@ import (
|
||||
func isRetryableAPIError(err error) bool {
|
||||
// These errors may indicate a transient error that we can retry in tests.
|
||||
if apierrors.IsInternalError(err) || apierrors.IsTimeout(err) || apierrors.IsServerTimeout(err) ||
|
||||
apierrors.IsTooManyRequests(err) || utilnet.IsProbableEOF(err) || utilnet.IsConnectionReset(err) {
|
||||
apierrors.IsTooManyRequests(err) || utilnet.IsProbableEOF(err) || utilnet.IsConnectionReset(err) ||
|
||||
utilnet.IsConnectionRefused(err) {
|
||||
return true
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user