RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=2087231
When using `ManageNetworks: false` the gateway IPs are '' (empty string) instead of `null` when not set. This happens because the default[2] is '' and in the `ManageNetwork: false` case the `gateway_ip` in `network_attributes_map` is the value of the parameter. In the `ManageNetwork: true` case the value is from the Heat resource which is a `null` value when no gateway is set.
The YAQL expression[1] filters `null` values, but the '' (empty string) value is included in the list. The ping gateway test end up trying to run "ping $args $empty_string" which of course fails.
2022-05-17 13:34:43.787038 | 525400f9-7a8a-d346-8ffd-000000000b9f | FATAL | Check all networks Gateway availability | cell1-compute-0 | error={"ansible_loop_var": "gateway_ip", "changed": false, "cmd": ["ping", "-w", "10", "-c", "1"], "delta": "0:00:00.004407", "end": "2022-05-17 09:34:43.657259", "gateway_ip": "", "msg": "non-zero return code", "rc": 2, "start": "2022-05-17 09:34:43.652852", "stderr": "Usage: ping [-aAbBdDfhLnOqrRUvV64] [-c count] [-i interval] [-I interface]\n [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos]\n [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option]\n [-w deadline] [-W timeout] [hop1 ...] destination\nUsage: ping -6 [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface]\n [-l preload] [-m mark] [-M pmtudisc_option]\n [-N nodeinfo_option] [-p pattern] [-Q tclass] [-s packetsize]\n [-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline]\n [-W timeout] destination", "stderr_lines": ["Usage: ping [-aAbBdDfhLnOqrRUvV64] [-c count] [-i interval] [-I interface]", " [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos]", " [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option]", " [-w deadline] [-W timeout] [hop1 ...] destination", "Usage: ping -6 [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface]", " [-l preload] [-m mark] [-M pmtudisc_option]", " [-N nodeinfo_option] [-p pattern] [-Q tclass] [-s packetsize]", " [-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline]", " [-W timeout] destination"], "stdout": "", "stdout_lines": []}
For the overcloud deployment:
/var/lib/mistral/overcloud/global_vars.yaml contains:
ping_test_gateway_ips:
BlockStorage: []
CephStorage: []
Compute: []
Controller:
- 10.0.0.1
ObjectStorage: []
For the Cell deployment:
/var/lib/mistral/cell1/global_vars.yaml contains:
ping_test_gateway_ips:
CellController:
- ''
- ''
- ''
- ''
- 10.0.0.1
Compute:
- ''
- ''
- ''
[1] https://opendev.org/openstack/tripleo-heat-templates/src/branch/master/overcloud.j2.yaml#L1244
[2] https://opendev.org/openstack/tripleo-heat-templates/src/branch/master/network/network.j2#L61-L68
[3] https://opendev.org/openstack/tripleo-heat-templates/src/branch/master/network/network.j2#L322
Fix proposed to branch: master /review. opendev. org/c/openstack /tripleo- heat-templates/ +/842274
Review: https:/