Workaround to fix ipset conflict with iptables

Sleep before ipset destroy in startup, otherwise the operation can
sometimes fail - see https://github.com/weaveworks/weave/issues/3847
This commit is contained in:
KevDG authored and Bryan Boreham committed 2021-01-18 12:33:54 +00:00
1 parent e91900cc9e
commit 3ef97f0c7c
1 file changed
+2
+2
View File
@@ -21,6 +21,8 @@ xt_set_exists() {
fi
iptables -w -F WEAVE-KUBE-TEST
iptables -w -X WEAVE-KUBE-TEST
# delay to allow kernel to clean up - see https://github.com/weaveworks/weave/issues/3847
sleep 1
ipset destroy weave-kube-test
[ -z "$NOT_EXIST" ] || (echo "\"xt_set\" does not exist" >&2 && return 1)
}