From 3ef97f0c7c697cf80076f5f0e520bd12ae0593d5 Mon Sep 17 00:00:00 2001 From: KevDG Date: Thu, 20 Aug 2020 15:15:44 +0200 Subject: [PATCH] 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 --- prog/weave-kube/init.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prog/weave-kube/init.sh b/prog/weave-kube/init.sh index 232fda82..6ff7916c 100755 --- a/prog/weave-kube/init.sh +++ b/prog/weave-kube/init.sh @@ -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) }