From b5b2a3abd74f84943cf3fab7ca7da591d326661c Mon Sep 17 00:00:00 2001 From: Romanos Skiadas Date: Fri, 17 Mar 2017 10:55:28 +0200 Subject: Testcase 3 Apex compatibility fixes - Workaround a bug releng in getting opedaylight nodes - Add some sudo commands because the path is not properly set otherwise it seems - remove needless command that gets ip information from the compute, since that is already available from when the command was ran on the controller - Handle attaching the quagga instance to Apex's br-ex ovs bridge Change-Id: I870f1049d9cce696ec26376a09db5f9e9bac0bf9 Signed-off-by: Romanos Skiadas --- sdnvpn/artifacts/quagga_setup.sh | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'sdnvpn/artifacts/quagga_setup.sh') diff --git a/sdnvpn/artifacts/quagga_setup.sh b/sdnvpn/artifacts/quagga_setup.sh index 96d7374..6e61d9a 100644 --- a/sdnvpn/artifacts/quagga_setup.sh +++ b/sdnvpn/artifacts/quagga_setup.sh @@ -20,8 +20,27 @@ OWN_IP=%s # directly access the instance from the external net without NAT EXT_NET_MASK=%s -ip link set ens7 up -ip addr add $OWN_IP/$EXT_NET_MASK dev ens7 +if [[ $(getent hosts | awk '{print $2}') != *"$(cat /etc/hostname | awk '{print $1}')"* ]] +then +echo "127.0.1.1 $(cat /etc/hostname | awk '{print $1}')" | tee -a /etc/hosts +fi + +quagga_int='' +for net_int in $(netstat -ia | awk 'NR>2{print $1}'); +do +if [ -z "$(ifconfig | grep $net_int)" ] +then +quagga_int=$net_int +break +fi +done +if [ -z "$quagga_int" ] +then +echo 'No available network interface' +fi + +ip link set $quagga_int up +ip addr add $OWN_IP/$EXT_NET_MASK dev $quagga_int ZEBRA_CONFIG_LOCATION="/etc/quagga/zebra.conf" DAEMONS_FILE_LOCATION="/etc/quagga/daemons" -- cgit 1.2.3-korg