From b0e8c3d9fd64510d5201cfd43b854438e3ad5d62 Mon Sep 17 00:00:00 2001 From: Michal Skalski Date: Thu, 11 Aug 2016 20:20:25 +0200 Subject: 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 --- jjb/yardstick/yardstick-daily.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'jjb') 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} \ -- cgit 1.2.3-korg