diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml index b93293a6d6..46d62e7f8f 100644 --- a/overcloud.j2.yaml +++ b/overcloud.j2.yaml @@ -1300,7 +1300,7 @@ resources: {%- for role in roles %} {{role.name}}: yaql: - expression: list($.data.where($ != null)).flatten() + expression: list($.data.where($ != null and len($) > 0)).flatten() data: - {get_attr: [Networks, net_attributes_map, ctlplane, subnets, {get_param: {{role.name}}ControlPlaneSubnet}, gateway_ip]} {%- for network in networks %} diff --git a/releasenotes/notes/fix-PingTestGatewayIPsMap-yaql-filter-empty-string-b024ce1bce9754ef.yaml b/releasenotes/notes/fix-PingTestGatewayIPsMap-yaql-filter-empty-string-b024ce1bce9754ef.yaml new file mode 100644 index 0000000000..5794403afc --- /dev/null +++ b/releasenotes/notes/fix-PingTestGatewayIPsMap-yaql-filter-empty-string-b024ce1bce9754ef.yaml @@ -0,0 +1,11 @@ +--- +fixes: + - | + Fixes an issue where gateway ping validations performed during deployment + would fail. When setting the `ManageNetworks` parameter to `false` and no + gateway was configured, the list of gateway IP addresses to ping would + include empty strings for networks with no gateway. The validation would + attempt to run a ping command without the address to ping, which caused the + deployment to fail. See bug: + `1973866 `_. +