aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles
diff options
context:
space:
mode:
authorVladislav Belogrudov <vladislav.belogrudov@oracle.com>2016-10-14 17:37:36 +0300
committerJeffrey Zhang <jeffrey.zhang@99cloud.net>2016-11-06 06:43:51 +0000
commit35ac9205a15551af6cd6714b3648e329f8f3de42 (patch)
treedb3b55f35234ff2c2ee286f75a3e9e4f1eaf817f /ansible/roles
parent31c2a255fc3bcc9a51b77c3b1f75ed59b10f9fbf (diff)
downloadkolla-35ac9205a15551af6cd6714b3648e329f8f3de42.tar.gz
kolla-35ac9205a15551af6cd6714b3648e329f8f3de42.zip
Check api_interface instead of network_interface
Precheck tasks test network_interface configuration but services run at api_interface. Also it makes more sense to start tests in order "interfaces->addresses->per-service ports". Change-Id: Iaf4c3cd08be1466b6c710b91653394f22947ee29 Closes-Bug: #1633503
Diffstat (limited to 'ansible/roles')
-rw-r--r--ansible/roles/prechecks/tasks/port_checks.yml68
1 files changed, 34 insertions, 34 deletions
diff --git a/ansible/roles/prechecks/tasks/port_checks.yml b/ansible/roles/prechecks/tasks/port_checks.yml
index 9ed04e591..7aa1e0d67 100644
--- a/ansible/roles/prechecks/tasks/port_checks.yml
+++ b/ansible/roles/prechecks/tasks/port_checks.yml
@@ -1,4 +1,38 @@
---
+- name: Checking the api_interface is present
+ fail: "msg='Please check the api_interface property - interface {{ api_interface }} not found'"
+ when: api_interface not in ansible_interfaces
+
+- name: Checking the api_interface is active
+ fail: "msg='Please check the api_interface settings - interface {{ api_interface }} is not active'"
+ when: hostvars[inventory_hostname]['ansible_' + api_interface]['active'] != True
+
+- name: Checking the api_interface configuration
+ fail: "msg='Please check the api_interface settings - interface {{ api_interface }} configuration missing'"
+ when: hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4'] is not defined
+
+- name: Checking the api_interface ip address configuration
+ fail: "msg='Please check the api_interface settings - interface {{ api_interface }} ip address problem'"
+ when: hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] is not defined
+
+- 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 api_interface on all nodes
+ command: ip -4 -o addr show dev {{ api_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 free port for Aodh API
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
@@ -895,37 +929,3 @@
when:
- inventory_hostname in groups['haproxy']
- enable_searchlight | 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
-
-- 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