From 6937136950a2522432e2908fdef255bc61e6f0e2 Mon Sep 17 00:00:00 2001 From: Daniel Pawlik Date: Tue, 19 May 2026 13:35:00 +0200 Subject: [PATCH] [openshift_setup] Add retry and delay on getting OpenShift info Tasks executed before patch_samples_registry.yml triggers OpenShift API to rollback, so when the hypervisor is overloaded it fails with error: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.crc.testing', port=6443): Max retries exceeded with url: /apis/samples.operator.openshift.io/v1/configs/cluster (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) Add retry to prevent such error. Signed-off-by: Daniel Pawlik --- roles/openshift_setup/tasks/patch_samples_registry.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/openshift_setup/tasks/patch_samples_registry.yml b/roles/openshift_setup/tasks/patch_samples_registry.yml index 4c7bac59d..0702035fc 100644 --- a/roles/openshift_setup/tasks/patch_samples_registry.yml +++ b/roles/openshift_setup/tasks/patch_samples_registry.yml @@ -13,3 +13,7 @@ - op: replace path: /spec/samplesRegistry value: "{{ cifmw_openshift_setup_samples_registry }}" + register: _samples_registry_config + until: _samples_registry_config is succeeded + retries: 5 + delay: 10