Skip to content
Snippets Groups Projects
Commit 59dd9a44 authored by zhubingbing's avatar zhubingbing Committed by caoyuan
Browse files

Move watcher precheck into its own role

Refers to https://review.openstack.org/#/c/399354/

Change-Id: I28f77d996593978caa3cb63f1c0b0fb096d2d62a
Partially-implements: blueprint condition-pre-check
parent 8bd87dcc
No related branches found
No related tags found
No related merge requests found
...@@ -35,3 +35,14 @@ ...@@ -35,3 +35,14 @@
- enable_glance | bool - enable_glance | bool
- inventory_hostname in groups['haproxy'] - inventory_hostname in groups['haproxy']
- "{{ 'glance_registry' not in haproxy_stat }}" - "{{ 'glance_registry' not in haproxy_stat }}"
- name: Checking free port for watcher API HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ watcher_api_port }}"
connect_timeout: 1
state: stopped
when:
- enable_watcher | bool
- "{{ 'watcher_api' not in haproxy_stat }}"
- inventory_hostname in groups['haproxy']
...@@ -890,26 +890,6 @@ ...@@ -890,26 +890,6 @@
- enable_mistral | bool - enable_mistral | bool
- inventory_hostname in groups['haproxy'] - inventory_hostname in groups['haproxy']
- name: Checking free port for Watcher API
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ watcher_api_port }}"
connect_timeout: 1
state: stopped
when:
- enable_watcher | bool
- inventory_hostname in groups['watcher-api']
- name: Checking free port for Watcher API HAProxy
wait_for:
host: "{{ kolla_internal_vip_address }}"
port: "{{ watcher_api_port }}"
connect_timeout: 1
state: stopped
when:
- enable_watcher | bool
- inventory_hostname in groups['haproxy']
- name: Checking free port for Searchlight API - name: Checking free port for Searchlight API
wait_for: wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
......
--- ---
- name: Get container facts
kolla_container_facts:
name:
- watcher_api
register: container_facts
- name: Checking free port for watcher API
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ watcher_api_port }}"
connect_timeout: 1
state: stopped
when:
- container_facts['watcher_api'] is not defined
- inventory_hostname in groups['watcher-api']
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment