diff --git a/ansible/roles/haproxy/tasks/start.yml b/ansible/roles/haproxy/tasks/start.yml index 5f838cd512089de372c3a29705d52df164d48e2f..0193350f70da462662889a034faa04fb45584d24 100644 --- a/ansible/roles/haproxy/tasks/start.yml +++ b/ansible/roles/haproxy/tasks/start.yml @@ -1,26 +1,26 @@ --- -- name: Starting keepalived container +- name: Starting haproxy container kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" - image: "{{ keepalived_image_full }}" - name: "keepalived" + image: "{{ haproxy_image_full }}" + name: "haproxy" privileged: True volumes: - - "{{ node_config_directory }}/keepalived/:{{ container_config_directory }}/:ro" - - "/run:/run" - - "/lib/modules:/lib/modules:ro" + - "{{ node_config_directory }}/haproxy/:{{ container_config_directory }}/:ro" + - "haproxy_socket:/var/lib/kolla/haproxy/" -- name: Starting haproxy container +- name: Starting keepalived container kolla_docker: action: "start_container" common_options: "{{ docker_common_options }}" - image: "{{ haproxy_image_full }}" - name: "haproxy" + image: "{{ keepalived_image_full }}" + name: "keepalived" privileged: True volumes: - - "{{ node_config_directory }}/haproxy/:{{ container_config_directory }}/:ro" - - "/run:/run" + - "{{ node_config_directory }}/keepalived/:{{ container_config_directory }}/:ro" + - "/lib/modules:/lib/modules:ro" + - "haproxy_socket:/var/lib/kolla/haproxy/" - name: Ensuring latest haproxy config is used command: docker exec haproxy /usr/local/bin/kolla_ensure_haproxy_latest_config diff --git a/ansible/roles/haproxy/templates/haproxy.cfg.j2 b/ansible/roles/haproxy/templates/haproxy.cfg.j2 index e8af22ea1e3ec3a7af4aa4b2695c58d8a4557775..d45682d31dccd568885538058bc8c0f216534bf5 100644 --- a/ansible/roles/haproxy/templates/haproxy.cfg.j2 +++ b/ansible/roles/haproxy/templates/haproxy.cfg.j2 @@ -1,7 +1,7 @@ global daemon maxconn 4000 - stats socket /run/haproxy.sock + stats socket /var/lib/kolla/haproxy/haproxy.sock defaults mode http diff --git a/docker/keepalived/check_alive.sh b/docker/keepalived/check_alive.sh index 8c2684f10b3434605562f0b1ca752533d32a374f..9bb87d7b78c4fbdfc47842d2a1fd122f3192b5d9 100644 --- a/docker/keepalived/check_alive.sh +++ b/docker/keepalived/check_alive.sh @@ -3,4 +3,4 @@ # This will return 0 when it successfully talks to the haproxy daemon via the socket # Failures return 1 -echo "show info" | socat unix-connect:/run/haproxy.sock stdio +echo "show info" | socat unix-connect:/var/lib/kolla/haproxy/haproxy.sock stdio