Skip to content

Commit 73cf1a3

Browse files
Include fix for default(omit) placeholder leak in install-config template (PR #20)
Cherry-picked from fix-omit-leak-install-config branch to unblock CI. Without this fix, openshift-install fails immediately with: "platform.openstack.controlPlanePort.fixedIPs[0].subnet.id: Invalid value: __omit_place_holder__...: invalid subnet ID" The omit sentinel leaks because default(omit) only works in Ansible module parameters, not in vars passed to ansible.builtin.template. This fix uses empty defaults and truthiness checks instead. OCPBUGS-95045 Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 2d2585d commit 73cf1a3

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

collection/stages/roles/install/tasks/install_config_generation/ipi_install_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
installcfg_api_vips: "{{ ocp_deployment_topology.primary_ip_protocol == 'ipv6' }}"
4646
installcfg_api_floating_ip: "{{ precreated_api_fip }}"
4747
installcfg_ingress_floating_ip: "{{ precreated_ingress_fip }}"
48-
installcfg_machines_subnet: "{{ machines_subnet_id | default(omit) }}"
48+
installcfg_machines_subnet: "{{ machines_subnet_id | default('') }}"
4949
installcfg_cluster_network: "{{ ocp_deployment_topology[ocp_deployment_topology.primary_ip_protocol].cluster_network }}"
5050
installcfg_service_network: "{{ ocp_deployment_topology[ocp_deployment_topology.primary_ip_protocol].service_network }}"
5151
installcfg_default_machine_platform: "{{ ocp_deployment_topology.defaultMachinePlatform | default({}) }}"
5252
installcfg_cluster_os_image_properties: "{{ ocp_deployment_topology.platform.openstack.clusterOSImageProperties | default({}) }}"
53-
installcfg_additional_trust_bundle: "{{ _cacert_content.stdout_lines | default(omit) }}"
53+
installcfg_additional_trust_bundle: "{{ _cacert_content.stdout_lines | default([]) }}"

collection/stages/roles/install/templates/install-config-ipi.yaml.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ platform:
4545
{{ key }}: {{ value }}
4646
{%- endfor +%}
4747
{%- endif +%}
48-
{%- if installcfg_machines_subnet is defined +%}
48+
{%- if installcfg_machines_subnet +%}
4949
machinesSubnet: {{ installcfg_machines_subnet }}
5050
{%- endif +%}
5151
{%- if installcfg_api_vips +%}
@@ -64,15 +64,15 @@ platform:
6464
externalNetwork: "{{ installcfg_external_network }}"
6565
apiFloatingIP: "{{ installcfg_api_floating_ip }}"
6666
ingressFloatingIP: "{{ installcfg_ingress_floating_ip }}"
67-
{%- if installcfg_machines_subnet is not defined +%}
67+
{%- if not installcfg_machines_subnet +%}
6868
externalDNS: {{ installcfg_dns_servers }}
6969
{%- endif +%}
7070
{%- endif +%}
7171
pullSecret: |
7272
{{ ocp_pull_secret }}
7373
sshKey: |
7474
{{ ocp_public_key }}
75-
{%- if installcfg_additional_trust_bundle is defined +%}
75+
{%- if installcfg_additional_trust_bundle +%}
7676
additionalTrustBundle: |
7777
{% for line in installcfg_additional_trust_bundle %}
7878
{{ line }}

0 commit comments

Comments
 (0)