6c238ca3bf
rabbitmq's start task contains a precheck. This should be part of the other prechecks for consistency TrivialFix Change-Id: I7728ec3f5be3248424d74a4387925b72114b8943
477 lines
16 KiB
YAML
477 lines
16 KiB
YAML
---
|
|
- name: Checking free port for Cinder API
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ cinder_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['cinder-api']
|
|
|
|
- name: Checking free port for Cinder API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ cinder_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Glance API
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ glance_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['glance-api']
|
|
|
|
- name: Checking free port for Glance API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ glance_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Glance Registry
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ glance_registry_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['glance-registry']
|
|
|
|
- name: Checking free port for Glance Registry HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ glance_registry_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for HAProxy stats
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ haproxy_stats_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Heat API
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ heat_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['heat-api']
|
|
|
|
- name: Checking free port for Heat API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ heat_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Heat API CFN
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ heat_api_cfn_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['heat-api-cfn']
|
|
|
|
- name: Checking free port for Heat API CFN HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ heat_api_cfn_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Horizon
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "80"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['horizon']
|
|
|
|
- name: Checking free port for Horizon HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "80"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Ironic
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ ironic_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['ironic-api']
|
|
|
|
- name: Checking free port for Ironic HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ ironic_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Keystone Admin
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ keystone_admin_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['keystone']
|
|
|
|
- name: Checking free port for Keystone Admin HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ keystone_admin_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Keystone Public
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ keystone_public_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['keystone']
|
|
|
|
- name: Checking free port for Keystone Public HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ keystone_public_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for iscsi
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ iscsi_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['tgtd']
|
|
|
|
- name: Checking free port for MariaDB
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ database_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['mariadb']
|
|
|
|
- name: Checking free port for MariaDB HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ database_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for MariaDB WSREP
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ mariadb_wsrep_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['mariadb']
|
|
|
|
- name: Checking free port for MariaDB IST
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ mariadb_ist_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['mariadb']
|
|
|
|
- name: Checking free port for MariaDB SST
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ mariadb_sst_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['mariadb']
|
|
|
|
- name: Checking free port for Memcached
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ memcached_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['memcached']
|
|
|
|
- name: Checking free port for Murano API
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ murano_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['murano-api']
|
|
|
|
- name: Checking free port for Murano API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ murano_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Neutron Server
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ neutron_server_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['neutron-server']
|
|
|
|
- name: Checking free port for Neutron Server HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ neutron_server_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Nova API
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ nova_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['nova-api']
|
|
|
|
- name: Checking free port for Nova API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ nova_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Nova Metadata
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ nova_metadata_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['nova-api']
|
|
|
|
- name: Checking free port for Nova Metadata HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ nova_metadata_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Nova NoVNC Proxy
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ nova_novncproxy_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['nova-novncproxy']
|
|
|
|
- name: Checking free port for Nova NoVNC HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ nova_novncproxy_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Nova Spice HTML5 Proxy
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ nova_spicehtml5proxy_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['nova-spicehtml5proxy']
|
|
|
|
- name: Checking free port for Nova Spice HTML5 HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ nova_spicehtml5proxy_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for RabbitMQ
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ rabbitmq_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['rabbitmq']
|
|
|
|
- name: Checking free port for RabbitMQ Management
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ rabbitmq_management_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['rabbitmq']
|
|
|
|
- name: Checking free port for RabbitMQ Management HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ rabbitmq_management_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for RabbitMQ Cluster
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ rabbitmq_cluster_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['rabbitmq']
|
|
|
|
- name: Checking free port for RabbitMQ EPMD
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ rabbitmq_epmd_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['rabbitmq']
|
|
|
|
- name: Check if all rabbit hostnames are resolvable
|
|
command: "getent ahostsv4 {{ hostvars[item]['ansible_hostname'] }}"
|
|
changed_when: false
|
|
register: rabbitmq_hostnames
|
|
with_items: "{{ groups['rabbitmq'] }}"
|
|
|
|
- fail: msg="Hostname has to resolve to IP address of api_interface"
|
|
with_items: "{{ rabbitmq_hostnames.results }}"
|
|
when: "'{{ hostvars[item['item']]['ansible_' + hostvars[item['item']]['api_interface']]['ipv4']['address'] }}' not in '{{ item.stdout }}'"
|
|
|
|
- name: Checking free port for Mongodb
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ mongodb_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['mongodb']
|
|
|
|
- name: Checking free port for Mongodb Web
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ mongodb_web_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['mongodb']
|
|
|
|
- name: Checking free port for Mongodb HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ mongodb_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Rsync
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}"
|
|
port: "873"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['swift-object-server']
|
|
|
|
- name: Checking free port for Swift Object Server
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ swift_object_server_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['swift-object-server']
|
|
|
|
- name: Checking free port for Swift Account Server
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ swift_account_server_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['swift-account-server']
|
|
|
|
- name: Checking free port for Swift Container Server
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ swift_container_server_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['swift-container-server']
|
|
|
|
- name: Checking free port for Swift Proxy Server
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ swift_proxy_server_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['swift-proxy-server']
|
|
|
|
- name: Checking free port for Swift Proxy Server HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ swift_proxy_server_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for RadosGW
|
|
wait_for:
|
|
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
|
|
port: "{{ rgw_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['ceph-rgw']
|
|
|
|
- name: Checking free port for RadosGW HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ rgw_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when: inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking if kolla_internal_vip_address and kolla_external_vip_address are not pingable from any node
|
|
command: ping -c 3 {{ item }}
|
|
register: ping_output
|
|
changed_when: false
|
|
with_items:
|
|
- "{{ kolla_internal_vip_address }}"
|
|
- "{{ kolla_external_vip_address }}"
|
|
failed_when: ping_output.rc != 1
|
|
when: enable_haproxy | bool
|
|
|
|
- name: Checking if kolla_internal_vip_address is in the same network as network_interface on all nodes
|
|
command: ip -4 -o addr show dev {{ network_interface }}
|
|
register: ip_addr_output
|
|
changed_when: false
|
|
failed_when: "'169.254.' not in kolla_internal_vip_address and \
|
|
kolla_internal_vip_address | ipaddr(ip_addr_output.stdout.split()[3]) is none"
|
|
when: enable_haproxy | bool
|
|
|
|
- name: Checking the network_interface is present
|
|
fail: "msg='Please check the network_interface property - interface {{ network_interface }} not found'"
|
|
when: network_interface not in ansible_interfaces
|
|
|
|
- name: Checking the network_interface is active
|
|
fail: "msg='Please check the network_interface settings - interface {{ network_interface }} is not active'"
|
|
when: hostvars[inventory_hostname]['ansible_' + network_interface]['active'] != True
|
|
|
|
- name: Checking the network_interface configuration
|
|
fail: "msg='Please check the network_interface settings - interface {{ network_interface }} configuration missing'"
|
|
when: hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4'] is not defined
|
|
|
|
- name: Checking the network_interface ip address configuration
|
|
fail: "msg='Please check the network_interface settings - interface {{ network_interface }} ip address problem'"
|
|
when: hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] is not defined
|