summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sdnvpn/artifacts/quagga_setup.sh13
-rw-r--r--sdnvpn/lib/utils.py21
-rw-r--r--sdnvpn/test/functest/testcase_3.py1
3 files changed, 18 insertions, 17 deletions
diff --git a/sdnvpn/artifacts/quagga_setup.sh b/sdnvpn/artifacts/quagga_setup.sh
index c2d27bc..a8fe9f6 100644
--- a/sdnvpn/artifacts/quagga_setup.sh
+++ b/sdnvpn/artifacts/quagga_setup.sh
@@ -5,11 +5,6 @@ set -xe
# change the password because this script is run on a passwordless cloud-image
echo 'ubuntu:opnfv' | chpasswd
-# dns fix
-
-echo "nameserver 8.8.8.8" > /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
-
# Wait for a floating IP
# as a workaround to NAT breakage
sleep 20
@@ -47,8 +42,12 @@ DAEMONS_FILE_LOCATION="/etc/quagga/daemons"
BGPD_CONFIG_LOCATION="/etc/quagga/bgpd.conf"
BGPD_LOG_FILE="/var/log/bgpd.log"
-DEBIAN_FRONTEND=noninteractive apt-get update
-DEBIAN_FRONTEND=noninteractive apt-get install quagga -y
+# Quagga is already installed to run as well in setups without inet
+# dns fix
+# echo "nameserver 8.8.8.8" > /etc/resolvconf/resolv.conf.d/head
+# resolvconf -u
+# DEBIAN_FRONTEND=noninteractive apt-get update
+# DEBIAN_FRONTEND=noninteractive apt-get install quagga -y
touch $BGPD_LOG_FILE
chown quagga:quagga $BGPD_LOG_FILE
diff --git a/sdnvpn/lib/utils.py b/sdnvpn/lib/utils.py
index 788e456..5eeb667 100644
--- a/sdnvpn/lib/utils.py
+++ b/sdnvpn/lib/utils.py
@@ -453,6 +453,8 @@ def wait_for_cloud_init(instance):
# ubuntu images take a long time to start
tries = 20
sleep_time = 30
+ logger.info("Waiting for cloud init of instance: {}"
+ "".format(instance.name))
while tries > 0:
instance_log = instance.get_console_output()
if "Failed to run module" in instance_log:
@@ -471,7 +473,8 @@ def wait_for_cloud_init(instance):
". Reason: %s",
instance_log)
success = False
-
+ logger.info("Finished waiting for cloud init of instance {} result was {}"
+ "".format(instance.name, success))
return success
@@ -487,14 +490,14 @@ def attach_instance_to_ext_br(instance, compute_node):
# and virsh-attaching the instance to the linux-bridge
bridge = "br-quagga"
cmd = """
- set -xe
- if ! brctl show |grep -q ^br-quagga;then
- sudo brctl addbr {bridge} &&
- sudo ip link set {bridge} up &&
- sudo ip link add quagga-tap type veth peer name ovs-quagga-tap &&
- sudo ip link set dev ovs-quagga-tap up &&
- sudo ip link set dev quagga-tap up &&
- sudo ovs-vsctl add-port br-ex ovs-quagga-tap &&
+ set -e
+ if ! sudo brctl show |grep -q ^{bridge};then
+ sudo brctl addbr {bridge}
+ sudo ip link set {bridge} up
+ sudo ip link add quagga-tap type veth peer name ovs-quagga-tap
+ sudo ip link set dev ovs-quagga-tap up
+ sudo ip link set dev quagga-tap up
+ sudo ovs-vsctl add-port br-ex ovs-quagga-tap
sudo brctl addif {bridge} quagga-tap
fi
"""
diff --git a/sdnvpn/test/functest/testcase_3.py b/sdnvpn/test/functest/testcase_3.py
index 1a23c56..3b7be0c 100644
--- a/sdnvpn/test/functest/testcase_3.py
+++ b/sdnvpn/test/functest/testcase_3.py
@@ -234,7 +234,6 @@ def main():
results.add_success(msg)
else:
results.add_failure(msg)
-
test_utils.attach_instance_to_ext_br(quagga_vm, compute)
testcase = "Bootstrap quagga inside an OpenStack instance"