Merge "Allow disabling keepalived for external LBs"
This commit is contained in:
commit
3af135d4fb
@ -417,6 +417,7 @@ openstack_interface: "admin"
|
||||
# could disable some of these required roles and run their own services.
|
||||
enable_glance: "yes"
|
||||
enable_haproxy: "yes"
|
||||
enable_keepalived: "{{ enable_haproxy | bool }}"
|
||||
enable_keystone: "yes"
|
||||
enable_mariadb: "yes"
|
||||
enable_memcached: "yes"
|
||||
|
@ -16,7 +16,7 @@ haproxy_services:
|
||||
keepalived:
|
||||
container_name: keepalived
|
||||
group: haproxy
|
||||
enabled: true
|
||||
enabled: "{{ enable_keepalived | bool }}"
|
||||
image: "{{ keepalived_image_full }}"
|
||||
privileged: True
|
||||
volumes:
|
||||
|
@ -5,7 +5,8 @@
|
||||
with_items:
|
||||
- { name: "net.ipv4.ip_nonlocal_bind", value: 1}
|
||||
- { name: "net.unix.max_dgram_qlen", value: 128}
|
||||
when: set_sysctl | bool
|
||||
when:
|
||||
- set_sysctl | bool
|
||||
|
||||
- name: Ensuring config directories exist
|
||||
file:
|
||||
|
@ -11,12 +11,16 @@
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
run_once: true
|
||||
when:
|
||||
- enable_keepalived | bool
|
||||
|
||||
- name: Create empty temp kolla_keepalived_running file
|
||||
local_action: copy content=None dest=/tmp/kolla_keepalived_running mode=0644
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
run_once: true
|
||||
when:
|
||||
- enable_keepalived | bool
|
||||
|
||||
- name: Getting hosts who is running keepalived
|
||||
local_action: copy content={{ ansible_hostname }} dest=/tmp/kolla_keepalived_running mode=0644
|
||||
@ -25,17 +29,21 @@
|
||||
when:
|
||||
- inventory_hostname in groups['haproxy']
|
||||
- container_facts['keepalived'] is defined
|
||||
- enable_haproxy | bool
|
||||
- enable_keepalived | bool
|
||||
|
||||
- name: Registering host running keepalived
|
||||
set_fact:
|
||||
host_running_keepalived: "{{ lookup('file', '/tmp/kolla_keepalived_running') }}"
|
||||
when:
|
||||
- enable_keepalived | bool
|
||||
|
||||
- name: Clearing temp kolla_keepalived_running file
|
||||
local_action: file path=/tmp/kolla_keepalived_running state=absent
|
||||
changed_when: False
|
||||
check_mode: no
|
||||
run_once: true
|
||||
when:
|
||||
- enable_keepalived | bool
|
||||
|
||||
- name: Clearing temp kolla_haproxy_running file
|
||||
local_action: file path=/tmp/kolla_haproxy_running state=absent
|
||||
@ -103,6 +111,7 @@
|
||||
- "{{ kolla_internal_vip_address }}"
|
||||
- "{{ kolla_external_vip_address }}"
|
||||
when:
|
||||
- enable_keepalived | bool
|
||||
- "host_running_keepalived == 'None'"
|
||||
- enable_haproxy | bool
|
||||
|
||||
@ -153,6 +162,7 @@
|
||||
kolla_internal_vip_address | ipaddr(ip_addr_output.stdout.split()[3]) is none)
|
||||
when:
|
||||
- enable_haproxy | bool
|
||||
- enable_keepalived | bool
|
||||
- container_facts['keepalived'] is not defined
|
||||
- inventory_hostname in groups['haproxy']
|
||||
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Add a configuration option `enable_keepalived` to allow disabling the
|
||||
service. This is useful when using an external LB in front of HAProxy.
|
Loading…
Reference in New Issue
Block a user