mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
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:
parent
f210d5758b
commit
075a4087d7
@ -17,6 +17,8 @@ limitations under the License.
|
|||||||
package e2e
|
package e2e
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||||
utilnet "k8s.io/apimachinery/pkg/util/net"
|
utilnet "k8s.io/apimachinery/pkg/util/net"
|
||||||
)
|
)
|
||||||
@ -32,5 +34,11 @@ func isRetryableAPIError(err error) bool {
|
|||||||
if _, shouldRetry := apierrors.SuggestsClientDelay(err); shouldRetry {
|
if _, shouldRetry := apierrors.SuggestsClientDelay(err); shouldRetry {
|
||||||
return true
|
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
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user