mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
e2e: isRetryableAPIError() should match any etcdserver timeout
framework.RunKubectl() returns an error that does not end with "etcdserver: request timed out", but contains the text somewhere in the middle: error running /usr/bin/kubectl --server=https://192.168.39.57:8443 --kubeconfig=/root/.kube/config --namespace=cephcsi-e2e-a44ec4b4 create -f -: Command stdout: stderr: Error from server: error when creating "STDIN": etcdserver: request timed out error: exit status 1 isRetryableAPIError() should return `true` for this case as well, so instead of using HasSuffix(), we'll use Contains(). Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
75dda7ac0d
commit
e75d308b9c
@ -37,7 +37,7 @@ func isRetryableAPIError(err error) bool {
|
||||
}
|
||||
|
||||
// "etcdserver: request timed out" does not seem to match the timeout errors above
|
||||
if strings.HasSuffix(err.Error(), "etcdserver: request timed out") {
|
||||
if strings.Contains(err.Error(), "etcdserver: request timed out") {
|
||||
return true
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user