From 195813dd60ddfdef3465cdda9744d4cf65362f90 Mon Sep 17 00:00:00 2001 From: Radosław Piliszek Date: Sun, 23 Feb 2020 17:14:47 +0100 Subject: CI: Add addressing on external network This is to allow CI testing of network connectivity. Note only "primary" node gets an address on it. Hence, "primary" becomes our fake external router. Depends-on: https://review.opendev.org/709361 Change-Id: I05592888796107d6de95b940c42b2bff73ac0669 --- tests/init-core-openstack.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/init-core-openstack.sh') diff --git a/tests/init-core-openstack.sh b/tests/init-core-openstack.sh index 02a445c4c..d50e82b06 100755 --- a/tests/init-core-openstack.sh +++ b/tests/init-core-openstack.sh @@ -12,6 +12,19 @@ function init_runonce { echo "Initialising OpenStack resources via init-runonce" tools/init-runonce &> /tmp/logs/ansible/init-runonce + + echo "Setting address on the external network bridge" + if [[ $SCENARIO == "linuxbridge" ]]; then + # NOTE(yoctozepto): linuxbridge agent manages its bridges by itself + # hence, we need to find the current name of the external network bridge + devname=$(basename $(readlink /sys/class/net/${EXT_NET_SLAVE_DEVICE}/master)) + else + devname=br-ex + # NOTE(yoctozepto): ovs virtual interfaces are down (not used) by default + # hence, we need to bring the external network bridge up + sudo ip link set ${devname} up + fi + sudo ip addr add ${EXT_NET_LOCAL_ADDR} dev ${devname} } -- cgit v1.2.3