From: Michal Skalski Date: Thu, 11 Aug 2016 18:20:25 +0000 (+0200) Subject: Fix Yardstick connection issue on virtual env X-Git-Tag: colorado.1.0~175^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=b0e8c3d9fd64510d5201cfd43b854438e3ad5d62;p=releng.git Fix Yardstick connection issue on virtual env Libvirt creates iptables rules for NAT network which reject inbound connections which not originate from host. Use the same appraoch as for functest and add iptables rule which allow connections from yardstick container to libvirt vm. JIRA: FUEL-166 Change-Id: I43840bd15cb3ff3fc0f8306ff43c83aabfa9b06f Signed-off-by: Michal Skalski --- diff --git a/jjb/yardstick/yardstick-daily.sh b/jjb/yardstick/yardstick-daily.sh index e8df9be58..7e9a65b82 100755 --- a/jjb/yardstick/yardstick-daily.sh +++ b/jjb/yardstick/yardstick-daily.sh @@ -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} \