Skip to content

Add default('') to discovered image vars#3799

Open
fultonj wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
fultonj:fix/va-hci-image-defaults
Open

Add default('') to discovered image vars#3799
fultonj wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
fultonj:fix/va-hci-image-defaults

Conversation

@fultonj
Copy link
Contributor

@fultonj fultonj commented Mar 25, 2026

cifmw_discovered_image_url and cifmw_discovered_hash are set dynamically by the discover_latest_image role. When networking_mapper serializes hostvars early in the play, these variables are not yet defined, causing a fatal undefined variable error. Add | default('') so serialization succeeds; the real values are populated later when discover_latest_image runs.

Assisted-By: Claude Sonnet 4.6 noreply@anthropic.com

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 25, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign yorabl for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fultonj
Copy link
Contributor Author

fultonj commented Mar 25, 2026

My deployment fails without this patch when I use the following ansible:

$ ansible --version
ansible [core 2.20.3]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/johfulto/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/johfulto/test-python/lib64/python3.14/site-packages/ansible
  ansible collection location = /home/johfulto/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/johfulto/test-python/bin/ansible
  python version = 3.14.3 (main, Feb  4 2026, 00:00:00) [GCC 15.2.1 20260123 (Red Hat 15.2.1-7)] (/home/johfulto/test-python/bin/python3)
  jinja version = 3.1.6
  pyyaml version = 6.0.3 (with libyaml v0.2.5)

cifmw_discovered_image_url and cifmw_discovered_hash are set
dynamically by the discover_latest_image role. When networking_mapper
serializes hostvars early in the play, these variables are not yet
defined, causing a fatal undefined variable error. Add | default('')
so serialization succeeds; the real values are populated later when
discover_latest_image runs.

Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: John Fulton <fulton@redhat.com>
@fultonj fultonj force-pushed the fix/va-hci-image-defaults branch from e5dc773 to e1d015e Compare March 25, 2026 13:56
@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/4eef9e51d577495f8c7e676d45ac837e

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 22m 04s
podified-multinode-edpm-deployment-crc RETRY_LIMIT in 5m 26s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 20m 45s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 08m 13s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 9m 37s
✔️ cifmw-pod-pre-commit SUCCESS in 10m 40s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant