diff --git a/ansible/roles/haproxy/tasks/precheck.yml b/ansible/roles/haproxy/tasks/precheck.yml index b8f48000b0..6a615dccbe 100644 --- a/ansible/roles/haproxy/tasks/precheck.yml +++ b/ansible/roles/haproxy/tasks/precheck.yml @@ -518,6 +518,60 @@ - haproxy_stat.find('mistral_api') == -1 - "host_running_haproxy == 'None'" +- name: Checking free port for Monasca API internal HAProxy + wait_for: + host: "{{ kolla_internal_vip_address }}" + port: "{{ monasca_api_port }}" + connect_timeout: 1 + timeout: 1 + state: stopped + when: + - enable_monasca | bool + - inventory_hostname in groups['haproxy'] + - haproxy_stat.find('monasca_api') == -1 + - "host_running_haproxy == 'None'" + +- name: Checking free port for Monasca API public HAProxy + wait_for: + host: "{{ kolla_external_vip_address }}" + port: "{{ monasca_api_port }}" + connect_timeout: 1 + timeout: 1 + state: stopped + when: + - haproxy_enable_external_vip | bool + - enable_monasca | bool + - inventory_hostname in groups['haproxy'] + - haproxy_stat.find('monasca_api_external') == -1 + - "host_running_haproxy == 'None'" + +- name: Checking free port for Monasca Log API internal HAProxy + wait_for: + host: "{{ kolla_internal_vip_address }}" + port: "{{ monasca_log_api_port }}" + connect_timeout: 1 + timeout: 1 + state: stopped + when: + - enable_monasca | bool + - inventory_hostname in groups['haproxy'] + - haproxy_stat.find('monasca_log_api') == -1 + - "host_running_haproxy == 'None'" + +- name: Checking free port for Monasca Log API public HAProxy + wait_for: + host: "{{ kolla_external_vip_address }}" + port: "{{ monasca_log_api_port }}" + connect_timeout: 1 + timeout: 1 + state: stopped + when: + - haproxy_enable_external_vip | bool + - enable_monasca | bool + - inventory_hostname in groups['haproxy'] + - haproxy_stat.find('monasca_log_api_external') == -1 + - "host_running_haproxy == 'None'" + - name: Checking free port for Mongodb HAProxy wait_for: host: "{{ kolla_internal_vip_address }}"