
Follow-up on [1] "Avoid multiple haproxy restarts after reconfiguration". There is no need to duplicate handler name in listen. The issue was because we had two handlers with the same name in the same environment. This causes Ansible not to mark handler as already run. [1] https://review.opendev.org/708385 Change-Id: I5425a8037b6860ef71bce59becff8dfe5b601d4c Related-Bug: #1864810
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
---
|
|
- name: Restart haproxy container
|
|
vars:
|
|
service_name: "haproxy"
|
|
service: "{{ haproxy_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
privileged: "{{ service.privileged | default(False) }}"
|
|
volumes: "{{ service.volumes }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
- inventory_hostname in groups[service.group]
|
|
- service.enabled | bool
|
|
notify:
|
|
- Waiting for haproxy to start
|
|
|
|
- name: Restart keepalived container
|
|
vars:
|
|
service_name: "keepalived"
|
|
service: "{{ haproxy_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
privileged: "{{ service.privileged | default(False) }}"
|
|
volumes: "{{ service.volumes }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
- inventory_hostname in groups[service.group]
|
|
- service.enabled | bool
|
|
notify:
|
|
- Waiting for virtual IP to appear
|
|
|
|
- name: Waiting for haproxy to start
|
|
wait_for:
|
|
host: "{{ api_interface_address }}"
|
|
port: "{{ haproxy_monitor_port }}"
|
|
|
|
- name: Waiting for virtual IP to appear
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ haproxy_monitor_port }}"
|