diff options
Diffstat (limited to 'docker/services/pacemaker/haproxy.yaml')
-rw-r--r-- | docker/services/pacemaker/haproxy.yaml | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/docker/services/pacemaker/haproxy.yaml b/docker/services/pacemaker/haproxy.yaml index 3cdc5255..2cc04e96 100644 --- a/docker/services/pacemaker/haproxy.yaml +++ b/docker/services/pacemaker/haproxy.yaml @@ -78,8 +78,7 @@ outputs: config_settings: map_merge: - get_attr: [HAProxyBase, role_data, config_settings] - - tripleo::haproxy::haproxy_daemon: false - haproxy_docker: true + - haproxy_docker: true tripleo::profile::pacemaker::haproxy_bundle::haproxy_docker_image: &haproxy_image {get_param: DockerHAProxyImage} # the list of directories that contain the certs to bind mount in the countainer # bind-mounting the directories rather than all the cert, key and pem files ensures @@ -120,7 +119,7 @@ outputs: data: *tls_mapping kolla_config: /var/lib/kolla/config_files/haproxy.json: - command: haproxy -f /etc/haproxy/haproxy.cfg + command: /usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg config_files: - source: "/var/lib/kolla/config_files/src/*" dest: "/" @@ -224,17 +223,31 @@ outputs: - name: set is_bootstrap_node fact tags: common set_fact: is_bootstrap_node={{bootstrap_node.stdout|lower == ansible_hostname|lower}} + - name: Check cluster resource status + tags: step2 + pacemaker_resource: + resource: {get_attr: [HAProxyBase, role_data, service_name]} + state: started + check_mode: true + ignore_errors: true + register: haproxy_res - name: Disable the haproxy cluster resource. tags: step2 pacemaker_resource: resource: {get_attr: [HAProxyBase, role_data, service_name]} state: disable wait_for_resource: true - when: is_bootstrap_node + register: output + retries: 5 + until: output.rc == 0 + when: is_bootstrap_node and haproxy_res|succeeded - name: Delete the stopped haproxy cluster resource. tags: step2 pacemaker_resource: resource: {get_attr: [HAProxyBase, role_data, service_name]} state: delete wait_for_resource: true - when: is_bootstrap_node + register: output + retries: 5 + until: output.rc == 0 + when: is_bootstrap_node and haproxy_res|succeeded |