diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2016-01-18 14:59:34 +0100 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2016-01-18 15:00:08 +0100 |
commit | d6d5b2750f21697337b154e7700432116b6ed4a4 (patch) | |
tree | eafe98b42c93fccccb231a0b6a4704a46544ce57 /jjb | |
parent | 6544d0ae3a7e409a1f8b6be23ce3d5c67e9607f2 (diff) |
yardstick: Remove iptables rules only if they exist
Normally, if Functest jjb is run before, it will have removed
the iptables,this way, we avoid removing something that
does not exist
Change-Id: I2676cc9c87aabaf670d617a9953915b27062b865
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/yardstick/yardstick-ci-jobs.yml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/jjb/yardstick/yardstick-ci-jobs.yml b/jjb/yardstick/yardstick-ci-jobs.yml index 56582c90a..6283e5da1 100644 --- a/jjb/yardstick/yardstick-ci-jobs.yml +++ b/jjb/yardstick/yardstick-ci-jobs.yml @@ -127,8 +127,11 @@ grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+") INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk {'print $1'}) sshkey="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa" - sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable - sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable + if [[ -n $(sudo iptables -L FORWARD |grep "REJECT"|grep "reject-with icmp-port-unreachable") ]]; then + #note: this happens only in opnfv-lf-pod1 + sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable + 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 |