Skip to content

Commit

Permalink
Add prechecks to validate kolla_internal_vip_address and
Browse files Browse the repository at this point in the history
kolla_external_vip_address

Change-Id: I4bd3b4283b85bd675927b9a54d6906bb3c0d668e
Closes-Bug: #1566571
  • Loading branch information
vhosakot committed Apr 11, 2016
1 parent 12735f0 commit 1c0dcd8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ansible/roles/prechecks/tasks/port_checks.yml
Expand Up @@ -446,3 +446,19 @@
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

- 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 \
'False' in kolla_internal_vip_address | ipaddr(ip_addr_output.stdout.split()[3])"

0 comments on commit 1c0dcd8

Please sign in to comment.