summaryrefslogtreecommitdiffstats
path: root/jjb/yardstick/yardstick-daily.sh
diff options
context:
space:
mode:
authorMichal Skalski <mskalski@mirantis.com>2016-08-11 20:20:25 +0200
committerMichal Skalski <mskalski@mirantis.com>2016-08-11 20:24:34 +0200
commitb0e8c3d9fd64510d5201cfd43b854438e3ad5d62 (patch)
treeb47aa535cdabb6f471ac2de832f78ca15daaf77d /jjb/yardstick/yardstick-daily.sh
parent43b81b7c3330a5f27dd640a871ea579957f8fc2b (diff)
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 <mskalski@mirantis.com>
Diffstat (limited to 'jjb/yardstick/yardstick-daily.sh')
-rwxr-xr-xjjb/yardstick/yardstick-daily.sh5
1 files changed, 5 insertions, 0 deletions
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} \