diff options
author | Julia Kreger <juliaashleykreger@gmail.com> | 2022-07-20 11:08:20 -0700 |
---|---|---|
committer | Julia Kreger <juliaashleykreger@gmail.com> | 2022-07-20 11:08:20 -0700 |
commit | f7471f07c3fc735696dc0291e6a187785d411e0c (patch) | |
tree | ddf6107ba66c8a452d990123e48d30e09bead9e1 | |
parent | 8c95131d81c1b12adb7e0fd758bc236017d20db7 (diff) | |
download | ironic-f7471f07c3fc735696dc0291e6a187785d411e0c.tar.gz |
CI: Only setup fake v6 interface if needed
In the case of CI test nodes natively supporting and using ipv6,
we don't need to actually setup a fake IPv6 network for ports
to bind to on the local system. So before doin gso, lets check
to see if we can ping the address first. If not, then set it up.
Change-Id: Ib68c706c1f9ef0ad0cf27e7a6acffd2c50ff37ea
-rw-r--r-- | devstack/lib/ironic | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 8c333d4e9..90842cfaf 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -1354,9 +1354,13 @@ function configure_ironic_provision_network { # with our global address, but iPXE seems to have in # consistant behavior in this configuration with devstack. # so we will setup a dummy interface and use that. - sudo ip link add magicv6 type dummy - sudo ip link set dev magicv6 up - sudo ip -6 addr add $IRONIC_HOST_IPV6/64 dev magicv6 + if ! $( ping -c1 -w1 $IRONIC_HOST_IPV6 ); then + # But before we create an interface, lets make sure it is + # not already working. + sudo ip link add magicv6 type dummy + sudo ip link set dev magicv6 up + sudo ip -6 addr add $IRONIC_HOST_IPV6/64 dev magicv6 + fi fi if is_service_enabled neutron-api; then if [[ "$IRONIC_IP_VERSION" == "6" ]]; then |