diff --git a/ansible/roles/haproxy/tasks/precheck.yml b/ansible/roles/haproxy/tasks/precheck.yml index e46aa7626a..33b375b7d1 100644 --- a/ansible/roles/haproxy/tasks/precheck.yml +++ b/ansible/roles/haproxy/tasks/precheck.yml @@ -391,6 +391,17 @@ - inventory_hostname in groups['haproxy'] - "{{ 'nova_spicehtml5proxy' not in haproxy_stat }}" +- name: Checking free port for Nova Placement API HAProxy + wait_for: + host: "{{ kolla_internal_vip_address }}" + port: "{{ placement_api_port }}" + connect_timeout: 1 + state: stopped + when: + - enable_nova | bool + - inventory_hostname in groups['haproxy'] + - "{{ 'placement_api' not in haproxy_stat }}" + - name: Checking free port for Octavia API HAProxy wait_for: host: "{{ kolla_internal_vip_address }}" diff --git a/ansible/roles/nova/tasks/precheck.yml b/ansible/roles/nova/tasks/precheck.yml index 743ff8fa1d..a1f5004210 100644 --- a/ansible/roles/nova/tasks/precheck.yml +++ b/ansible/roles/nova/tasks/precheck.yml @@ -6,6 +6,7 @@ - nova_novncproxy - nova_serialproxy - nova_spicehtml5proxy + - placement_api register: container_facts - name: Checking free port for Nova API @@ -72,3 +73,16 @@ - container_facts['nova_spicehtml5proxy'] is not defined - nova_spicehtml5proxy.enabled | bool - inventory_hostname in groups[nova_spicehtml5proxy.group] + +- name: Checking free port for Nova Placement API + vars: + placement_api: "{{ nova_services['placement-api'] }}" + wait_for: + host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" + port: "{{ placement_api_port }}" + connect_timeout: 1 + state: stopped + when: + - container_facts['placement_api'] is not defined + - inventory_hostname in groups[placement_api.group] + - placement_api.enabled | bool