Steps to reproduce
------------------
Deploy HAProxy on one or more servers. Add another server to the inventory in the haproxy group, and run the following:
kolla-ansible prechecks --limit <new host>
Expected results
----------------
Prechecks pass
Actual results
--------------
TASK [haproxy : Checking if kolla_internal_vip_address and kolla_external_vip_address are not pingable from any node] **************************************************************************************
failed: [controller0] (item={u'command': u'ping', u'address': u'192.168.33.2'}) => {"ansible_loop_var": "item", "changed": false, "cmd": ["ping", "-c", "3", "192.168.33.2"], "delta": "0:00:02.059599", "end": "2020-03-24 17:59:56.080378", "failed_when_result": true, "item": {"address": "192.168.33.2", "command": "ping"}, "rc": 0, "start": "2020-03-24 17:59:54.020779", "stderr": "", "stderr_lines": [], "stdout": "PING 192.168.33.2 (192.168.33.2) 56(84) bytes of data.\n64 bytes from 192.168.33.2: icmp_seq=1 ttl=64 time=0.479 ms\n64 bytes from 192.168.33.2: icmp_seq=2 ttl=64 time=0.219 ms\n64 bytes from 192.168.33.2: icmp_seq=3 ttl=64 time=0.172 ms\n\n--- 192.168.33.2 ping statistics ---\n3 packets transmitted, 3 received, 0% packet loss, time 57ms\nrtt min/avg/max/mdev = 0.172/0.290/0.479/0.135 ms", "stdout_lines": ["PING 192.168.33.2 (192.168.33.2) 56(84) bytes of data.", "64 bytes from 192.168.33.2: icmp_seq=1 ttl=64 time=0.479 ms", "64 bytes from 192.168.33.2: icmp_seq=2 ttl=64 time=0.219 ms", "64 bytes from 192.168.33.2: icmp_seq=3 ttl=64 time=0.172 ms", "", "--- 192.168.33.2 ping statistics ---", "3 packets transmitted, 3 received, 0% packet loss, time 57ms", "rtt min/avg/max/mdev = 0.172/0.290/0.479/0.135 ms"]}
failed: [controller0] (item={u'command': u'ping', u'address': u'192.168.33.2'}) => {"ansible_loop_var": "item", "changed": false, "cmd": ["ping", "-c", "3", "192.168.33.2"], "delta": "0:00:02.032246", "end": "2020-03-24 17:59:58.576390", "failed_when_result": true, "item": {"address": "192.168.33.2", "command": "ping"}, "rc": 0, "start": "2020-03-24 17:59:56.544144", "stderr": "", "stderr_lines": [], "stdout": "PING 192.168.33.2 (192.168.33.2) 56(84) bytes of data.\n64 bytes from 192.168.33.2: icmp_seq=1 ttl=64 time=0.279 ms\n64 bytes from 192.168.33.2: icmp_seq=2 ttl=64 time=0.181 ms\n64 bytes from 192.168.33.2: icmp_seq=3 ttl=64 time=0.271 ms\n\n--- 192.168.33.2 ping statistics ---\n3 packets transmitted, 3 received, 0% packet loss, time 30ms\nrtt min/avg/max/mdev = 0.181/0.243/0.279/0.047 ms", "stdout_lines": ["PING 192.168.33.2 (192.168.33.2) 56(84) bytes of data.", "64 bytes from 192.168.33.2: icmp_seq=1 ttl=64 time=0.279 ms", "64 bytes from 192.168.33.2: icmp_seq=2 ttl=64 time=0.181 ms", "64 bytes from 192.168.33.2: icmp_seq=3 ttl=64 time=0.271 ms", "", "--- 192.168.33.2 ping statistics ---", "3 packets transmitted, 3 received, 0% packet loss, time 30ms", "rtt min/avg/max/mdev = 0.181/0.243/0.279/0.047 ms"]}
This happens because ansible does not execute on hosts where haproxy/keepalived is running, and therefore does not know that the VIP should be active.
Fix proposed to branch: master /review. opendev. org/714950
Review: https:/