Merge "Improve repo server haproxy healthcheck to verify repo synchronisation"
This commit is contained in:
commit
93c240cc3f
@ -140,6 +140,7 @@ shared-infra_hosts:
|
||||
galera_container: 3
|
||||
memcached_container: 3
|
||||
rabbit_mq_container: 3
|
||||
repo_container: 3
|
||||
{% endif %}
|
||||
|
||||
repo-infra_hosts:
|
||||
|
@ -68,7 +68,9 @@ haproxy_default_services:
|
||||
haproxy_port: 8181
|
||||
haproxy_balance_type: http
|
||||
haproxy_backend_options:
|
||||
- "httpchk HEAD / HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck"
|
||||
- "httpchk GET /repo_sync_complete HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck"
|
||||
haproxy_backend_httpcheck_options:
|
||||
- "expect status 200"
|
||||
haproxy_service_enabled: "{{ groups['repo_all'] is defined and groups['repo_all'] | length > 0 }}"
|
||||
- service:
|
||||
haproxy_service_name: glance_api
|
||||
|
@ -24,9 +24,9 @@
|
||||
hosts: all_containers[0]:physical_hosts[0]
|
||||
gather_facts: yes
|
||||
vars:
|
||||
repo_requirements_file: "os-releases/{{ openstack_release }}/{{ os_distro_version }}/"
|
||||
repo_requirements_file: "repo_sync_complete"
|
||||
tasks:
|
||||
- name: Check the upper constraint on each repo server
|
||||
- name: Check the repo sync file on each repo server
|
||||
uri:
|
||||
url: "http://{{ hostvars[item]['container_address'] }}:{{ repo_server_port }}/{{ repo_requirements_file }}"
|
||||
with_inventory_hostnames: "{{ groups['repo_all'] }}"
|
||||
|
6
releasenotes/notes/repo_check-31eb53ae77ddeb41.yaml
Normal file
6
releasenotes/notes/repo_check-31eb53ae77ddeb41.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
other:
|
||||
- |
|
||||
HAProxy now verifies if repo server is healthy by ``repo_sync_complete``
|
||||
file that is created with repo_server role. This should prevent
|
||||
non-synced repo containers from participating in load balancing.
|
Loading…
Reference in New Issue
Block a user