From 03413a53fd9f16a517b0fe52408b91f488dd4299 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Thu, 6 Jun 2024 11:34:19 +0200 Subject: [PATCH] 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 --- e2e/errors.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/e2e/errors.go b/e2e/errors.go index ad32b5c88..2b880af11 100644 --- a/e2e/errors.go +++ b/e2e/errors.go @@ -58,6 +58,13 @@ func isRetryableAPIError(err error) bool { 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 }