From 3d6e5cb167a559d219dd8fbea4ada9bfcd146d47 Mon Sep 17 00:00:00 2001 From: Andrew Bonney Date: Fri, 4 Aug 2023 13:52:48 +0100 Subject: [PATCH] haproxy: fix health checks for serialconsole in http mode The serialconsole proxy appears to be a very simple WebSocket proxy with no obvious support for many HTTP methods. As such a HEAD or GET to / returns a 405. This patch adjusts the expected status code to ensure the service isn't marked as down, but it is worth noting that the health checks do make the serialproxy service logs a little noisy. Change-Id: Ie2e06c99b9c99435e29a321b373d6a937f4123f4 --- inventory/group_vars/nova_all/haproxy_service.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory/group_vars/nova_all/haproxy_service.yml b/inventory/group_vars/nova_all/haproxy_service.yml index 9ce0828a35..339dab2831 100644 --- a/inventory/group_vars/nova_all/haproxy_service.yml +++ b/inventory/group_vars/nova_all/haproxy_service.yml @@ -78,7 +78,7 @@ haproxy_nova_serial_console_service: haproxy_timeout_server: 60m haproxy_balance_alg: source haproxy_backend_options: "{{ haproxy_nova_console_http_mode | ternary(['httpchk HEAD / HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck'], []) }}" - haproxy_backend_httpcheck_options: "{{ haproxy_nova_console_http_mode | ternary(['expect status 200'], []) }}" + haproxy_backend_httpcheck_options: "{{ haproxy_nova_console_http_mode | ternary(['expect status 405'], []) }}" haproxy_backend_ssl: "{{ nova_backend_ssl | default(openstack_service_backend_ssl) }}" haproxy_backend_ca: "{{ nova_haproxy_backend_ca | default(openstack_haproxy_backend_ca) }}" haproxy_accept_both_protocols: "{{ nova_accept_both_protocols | default(openstack_service_accept_both_protocols) }}"