Use private or public ip in nox-remote job

We switched the Zuul tenant to use NIZ, and noticed a small bug:
the nodepool vars dict when set by niz behaves differently compared
to nodepool: the openstack driver will not substitute the public
ip for the private ip if there is no private ip.

Fix this by using either value; we may also update Zuul itself to
supply backwards-compatible behavior in the nodepool dict while
adding a new dict with more consistent behavior.

Change-Id: I9313a45503ae43378ea57f82a30ca15b08bcb690
This commit is contained in:
James E. Blair 2025-04-21 13:29:13 -07:00
parent 2d94f70647
commit f22770938c

View File

@ -90,7 +90,7 @@
ZUUL_ZK_CERT: /opt/zookeeper/ca/certs/client.pem
ZUUL_ZK_KEY: /opt/zookeeper/ca/keys/clientkey.pem
ZUUL_SSH_KEY: /home/zuul/.ssh/id_rsa
ZUUL_REMOTE_IPV4: "{{ nodepool.private_ipv4 }}"
ZUUL_REMOTE_IPV4: "{{ nodepool.private_ipv4 or nodepool.public_ipv4 }}"
ZUUL_REMOTE_KEEP: "true"
CI: "1"
nox_force_python: "3.11"