Update HAP check for nova console
The nova console types all have different ports and pathing that needs to be checked via the loadbalancer when running in production. This change updates our current check to use the proper pathing based on the console type being used. Without this change the logs will become full from 404 errors which is simply a loadbalancer healthcheck. To support this change, the variable `nova_consoles` was created which is a hash of consoles and provides an easy way to refernece the proper port and pathing without complex case-statements. Change-Id: If3285caea3f9974e030069eef5a5becc654e7a27 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
@@ -203,9 +203,9 @@ haproxy_default_services:
|
||||
haproxy_timeout_server: 60m
|
||||
haproxy_balance_alg: source
|
||||
haproxy_backend_options:
|
||||
- "httpchk HEAD / HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck"
|
||||
- "httpchk HEAD {{ hostvars[(groups['nova_console'] | default(['localhost']))[0] | default('localhost')]['nova_console_path'] | default('/spice_auto.html') }} HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck"
|
||||
haproxy_backend_httpcheck_options:
|
||||
- "expect status 404"
|
||||
- "expect status 200"
|
||||
haproxy_service_enabled: "{{ groups['nova_console'] is defined and groups['nova_console'] | length > 0 }}"
|
||||
- service:
|
||||
haproxy_service_name: cinder_api
|
||||
|
||||
@@ -24,7 +24,19 @@ nova_console_type: spice
|
||||
nova_novncproxy_port: 6080
|
||||
nova_spice_html5proxy_base_port: 6082
|
||||
nova_serialconsoleproxy_port: 6083
|
||||
nova_console_port: "{% if nova_console_type == 'spice' %}{{ nova_spice_html5proxy_base_port }}{% elif nova_console_type == 'novnc' %}{{ nova_novncproxy_port }}{% else %}{{ nova_serialconsoleproxy_port }} {% endif %}"
|
||||
nova_consoles:
|
||||
spice:
|
||||
port: "{{ nova_spice_html5proxy_base_port }}"
|
||||
path: "/spice_auto.html"
|
||||
novnc:
|
||||
port: "{{ nova_novncproxy_port }}"
|
||||
path: "/vnc_auto.html"
|
||||
serial:
|
||||
port: "{{ nova_serialconsoleproxy_port }}"
|
||||
path: "/"
|
||||
|
||||
nova_console_port: "{{ nova_consoles[nova_console_type]['port'] }}"
|
||||
nova_console_path: "{{ nova_consoles[nova_console_type]['path'] }}"
|
||||
|
||||
# These are here rather than in nova_all because
|
||||
# both the os_ceilometer and os_nova roles require them
|
||||
|
||||
Reference in New Issue
Block a user