diff --git a/glance/templates/deployment-api.yaml b/glance/templates/deployment-api.yaml index 239a58fcf9..d402eddadd 100644 --- a/glance/templates/deployment-api.yaml +++ b/glance/templates/deployment-api.yaml @@ -20,7 +20,7 @@ exec: command: - python - -c - - "import requests; requests.get('http://127.0.0.1:{{ $health_port }}{{ $health_path }}')" + - "import requests; r = requests.get('http://127.0.0.1:{{ $health_port }}{{ $health_path }}'); r.raise_for_status()" {{- else }} httpGet: path: {{ $health_path }} diff --git a/neutron/templates/deployment-server.yaml b/neutron/templates/deployment-server.yaml index 07de4e8443..ab8e4e679e 100644 --- a/neutron/templates/deployment-server.yaml +++ b/neutron/templates/deployment-server.yaml @@ -18,7 +18,7 @@ exec: command: - python - -c - - "import requests; requests.get('http://127.0.0.1:{{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}')" + - "import requests; r = requests.get('http://127.0.0.1:{{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}'); r.raise_for_status()" initialDelaySeconds: 30 {{- else }} httpGet: @@ -33,7 +33,7 @@ exec: command: - python - -c - - "import requests; requests.get('http://127.0.0.1:{{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}')" + - "import requests; r = requests.get('http://127.0.0.1:{{ tuple "network" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}'); r.raise_for_status()" initialDelaySeconds: 30 {{- else }} httpGet: diff --git a/releasenotes/notes/glance-cb814fab2bccc95e.yaml b/releasenotes/notes/glance-cb814fab2bccc95e.yaml new file mode 100644 index 0000000000..753403e53c --- /dev/null +++ b/releasenotes/notes/glance-cb814fab2bccc95e.yaml @@ -0,0 +1,6 @@ +--- +glance: + - | + add raise_for_status method call to the livenessProbe command to properly + raise an error when return code is 4xx (client error) or 5xx (server error) +... diff --git a/releasenotes/notes/neutron-3c11cf48f8c7c592.yaml b/releasenotes/notes/neutron-3c11cf48f8c7c592.yaml new file mode 100644 index 0000000000..f320382a89 --- /dev/null +++ b/releasenotes/notes/neutron-3c11cf48f8c7c592.yaml @@ -0,0 +1,6 @@ +--- +neutron: + - | + add raise_for_status method call to the livenessProbe command to properly + raise an error when return code is 4xx (client error) or 5xx (server error) +...