mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
e2e: retry on "transport: missing content-type field" error
The e2e sometimes fail getting objects like PVCs from the Kubernetes API server, and log the following error: Error getting pvc "rbd-6940" in namespace "rbd-694": rpc error: code = Unknown desc = OK: HTTP status code 200; transport: missing content-type field By checking the error message, and initiating a retry on this failure, CI jobs should fail less regulary. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
58074109d1
commit
ba60566cfb
@ -46,6 +46,13 @@ func isRetryableAPIError(err error) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// "transport: missing content-type field" is an error that sometimes
|
||||||
|
// is returned while talking to the kubernetes-api-server. There does
|
||||||
|
// not seem to be a public error constant for this.
|
||||||
|
if strings.Contains(err.Error(), "transport: missing content-type field") {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user