e2e: retry when a pod does not have a host assigned (yet)

Errors like "pod nfs-820 does not have a host assigned" seem to get
reported when a Pod is not completely started yet, or was restarted
while trying to access it.

Reported: https://github.com/ceph/ceph-csi/pull/4656#issuecomment-2151794926
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos 2024-06-06 11:34:19 +02:00 committed by mergify[bot]
parent 346e92ad8d
commit 03413a53fd

View File

@ -58,6 +58,13 @@ func isRetryableAPIError(err error) bool {
return true return true
} }
// "pod nfs-820 does not have a host assigned" seems to get reported
// when a Pod is not completely started yet, or was restarted while
// trying to access it
if strings.Contains(err.Error(), "does not have a host assigned") {
return true
}
return false return false
} }