From cba10669f52b4d8aca872e9b7d69f12f66d5bb82 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Mon, 2 Oct 2023 16:13:15 +0200 Subject: [PATCH] Fix the HTTP code for reaching max_concurrent_deploy: 503 instead of 500 Change-Id: I3d8c7724c1d44baa67a6364dde2f52abdb906526 --- ironic/common/exception.py | 2 +- .../notes/max_concurrent_deploy-7a31ba142bf5ad5c.yaml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/max_concurrent_deploy-7a31ba142bf5ad5c.yaml diff --git a/ironic/common/exception.py b/ironic/common/exception.py index ce7f4bd3d0..45672476ac 100644 --- a/ironic/common/exception.py +++ b/ironic/common/exception.py @@ -857,7 +857,7 @@ class ImageRefIsARedirect(IronicException): redirect_url=redirect_url) -class ConcurrentActionLimit(IronicException): +class ConcurrentActionLimit(TemporaryFailure): # NOTE(TheJulia): We explicitly don't report the concurrent # action limit configuration value as a security guard since # if informed of the limit, an attacker can tailor their attack. diff --git a/releasenotes/notes/max_concurrent_deploy-7a31ba142bf5ad5c.yaml b/releasenotes/notes/max_concurrent_deploy-7a31ba142bf5ad5c.yaml new file mode 100644 index 0000000000..92cb2b5e0a --- /dev/null +++ b/releasenotes/notes/max_concurrent_deploy-7a31ba142bf5ad5c.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + When Ironic hits the limit on the number of the concurrent deploys + (specified in the ``[conductor]max_concurrent_deploy`` option), the + resulting HTTP code is now 503 instead of the more generic 500.