Move haproxy socket to volume

Partial-Bug: #1544545
Change-Id: I292bcaeacb080ff4c5ab6b42b7d899039d6b19c4
This commit is contained in:
SamYaple 2016-02-16 20:28:51 +00:00 committed by Sam Yaple
parent 4a7fa654fc
commit 7ddad3f3d5
3 changed files with 15 additions and 15 deletions

View File

@ -1,16 +1,4 @@
---
- name: Starting keepalived container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ keepalived_image_full }}"
name: "keepalived"
privileged: True
volumes:
- "{{ node_config_directory }}/keepalived/:{{ container_config_directory }}/:ro"
- "/run:/run"
- "/lib/modules:/lib/modules:ro"
- name: Starting haproxy container
kolla_docker:
action: "start_container"
@ -20,7 +8,19 @@
privileged: True
volumes:
- "{{ node_config_directory }}/haproxy/:{{ container_config_directory }}/:ro"
- "/run:/run"
- "haproxy_socket:/var/lib/kolla/haproxy/"
- name: Starting keepalived container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ keepalived_image_full }}"
name: "keepalived"
privileged: True
volumes:
- "{{ 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

View File

@ -1,7 +1,7 @@
global
daemon
maxconn 4000
stats socket /run/haproxy.sock
stats socket /var/lib/kolla/haproxy/haproxy.sock
defaults
mode http

View File

@ -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