kolla-ansible/tests/init-core-openstack.sh
Radosław Piliszek 7367427338 [CI] Test Neutron with IPv6 networks
Make sure to actually test IPv6 connectivity to our test instance in the
IPv6 jobs.

Change-Id: I7845448804e191af356e82f8ad33c563ffd8ebd5
2023-03-26 09:34:53 +00:00

26 lines
658 B
Bash
Executable File

#!/bin/bash
set -o xtrace
set -o errexit
set -o pipefail
export PYTHONUNBUFFERED=1
function init_runonce {
. /etc/kolla/admin-openrc.sh
. ~/openstackclient-venv/bin/activate
echo "Initialising OpenStack resources via init-runonce"
KOLLA_DEBUG=1 tools/init-runonce |& gawk '{ print strftime("%F %T"), $0; }' &> /tmp/logs/ansible/init-runonce
if [[ $IP_VERSION -eq 6 ]]; then
# NOTE(yoctozepto): In case of IPv6 there is no NAT support in Neutron,
# so we have to set up native routing. Static routes are the simplest.
sudo ip route add ${DEMO_NET_CIDR} via ${EXT_NET_DEMO_ROUTER_ADDR}
fi
}
init_runonce