From 42617776133b60b0c3484c0781d1f021ad37779f Mon Sep 17 00:00:00 2001 From: Martynas Pumputis Date: Mon, 29 Jan 2018 16:03:43 +0100 Subject: [PATCH] Remove "-j KUBESERVICES" during teardown in 840 smoke test Remove the rule to ensure that api-server is not accessible while kube-proxy is not ready. Otherwise, we have a race between "-j KUBE-FORWARD" and "-j WEAVE-NPC" which makes the NodePort isolation test case to fail. --- test/840_weave_kube_3_test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/840_weave_kube_3_test.sh b/test/840_weave_kube_3_test.sh index adbc9d4c..48d57d56 100755 --- a/test/840_weave_kube_3_test.sh +++ b/test/840_weave_kube_3_test.sh @@ -5,6 +5,10 @@ tear_down_kubeadm() { for host in $HOSTS; do run_on $host "sudo kubeadm reset && sudo rm -r -f /opt/cni/bin/*weave*" + # Remove the rule to ensure that api-server is not accessible while kube-proxy + # is not ready. Otherwise, we have a race between "-j KUBE-FORWARD" and "-j WEAVE-NPC" + # which makes the NodePort isolation test case to fail. + run_on $host "sudo iptables -t nat -D PREROUTING -m comment --comment \"kubernetes service portals\" -j KUBE-SERVICES" || true done }