summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-07-01 16:39:41 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-07-01 16:39:41 +0000
commitcba01b75427c6b459b4c568e1f62c7f737a9420f (patch)
tree2e7e4583924e4a953c74bf0602703b35f7ddad6d
parentfa8d1440abd8d920a59e6b79bc2b80048d5347d8 (diff)
parentd168382710cfa45a21e7698128cf07471e8cc9c6 (diff)
Merge "Functest, Apex: Add iptables forwarding rule"
-rwxr-xr-xjjb/functest/set-functest-env.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/jjb/functest/set-functest-env.sh b/jjb/functest/set-functest-env.sh
index 0b8747a6f..3cbb4a515 100755
--- a/jjb/functest/set-functest-env.sh
+++ b/jjb/functest/set-functest-env.sh
@@ -27,6 +27,7 @@ if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
if sudo iptables -C FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable 2> ${redirect}; then
sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable
fi
+
elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then
# If production lab then creds may be retrieved dynamically
# creds are on the jumphost, always in the same folder
@@ -34,6 +35,12 @@ elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then
# If dev lab, credentials may not be the default ones, just provide a path to put them into docker
# 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}; then
+ sudo iptables -I FORWARD -j RETURN
+fi
+
echo "Functest: Start Docker and prepare environment"
envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
-e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \