Merge "Fix Yardstick connection issue on virtual env"
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Fri, 12 Aug 2016 06:55:41 +0000 (06:55 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Fri, 12 Aug 2016 06:55:41 +0000 (06:55 +0000)
jjb/yardstick/yardstick-daily.sh

index e8df9be..7e9a65b 100755 (executable)
@@ -23,6 +23,11 @@ elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then
     # replace the default one by the customized one provided by jenkins config
 fi
 
+# Set iptables rule to allow forwarding return traffic for container
+if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FORWARD | awk 'NR==3' | grep RETURN 2> ${redirect}; then
+    sudo iptables -I FORWARD -j RETURN
+fi
+
 opts="--privileged=true --rm"
 envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
     -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NETWORK=${EXTERNAL_NETWORK} \