From 2d70e14250cb87d2cc30bc8a3ddc806df59482ac Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sat, 2 Aug 2025 19:04:22 +0200 Subject: [PATCH] Also retry on HTTP statuses 502 and 504. (#947) (#948) (cherry picked from commit 75413d0b087df0368cbde6da811b18e6dc3c6795) Co-authored-by: Felix Fontein --- changelogs/fragments/947-acme-retry.yml | 4 ++++ plugins/module_utils/acme/acme.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/947-acme-retry.yml diff --git a/changelogs/fragments/947-acme-retry.yml b/changelogs/fragments/947-acme-retry.yml new file mode 100644 index 00000000..71196037 --- /dev/null +++ b/changelogs/fragments/947-acme-retry.yml @@ -0,0 +1,4 @@ +bugfixes: + - "acme_* modules - also retry on HTTP responses 502 Bad Gateway and 504 Gateway Timeout. The latter is needed for ZeroSSL, + which seems to have a lot of 504s + (https://github.com/ansible-collections/community.crypto/issues/945, https://github.com/ansible-collections/community.crypto/pull/947)." diff --git a/plugins/module_utils/acme/acme.py b/plugins/module_utils/acme/acme.py index caded1d5..5c70b5ed 100644 --- a/plugins/module_utils/acme/acme.py +++ b/plugins/module_utils/acme/acme.py @@ -60,7 +60,7 @@ else: # -1 usually means connection problems -RETRY_STATUS_CODES = (-1, 408, 429, 503) +RETRY_STATUS_CODES = (-1, 408, 429, 502, 503, 504) RETRY_COUNT = 10