Unverified Commit 741beb64 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #54888 from Cynerva/gkk/fix-iptables-conflict

Automatic merge from submit-queue (batch tested with PRs 54822, 53561, 54888). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fix hook failure in kubernetes-worker charm due to iptables conflict **What this PR does / why we need it**: This fixes a hook failure that can occur on the kubernetes-worker charm due to iptable conflicts: ``` Another app is currently holding the xtables lock. Perhaps you want to use the -w option? ... subprocess.CalledProcessError: Command '['iptables', '-P', 'FORWARD', 'ACCEPT']' returned non-zero exit status 4 ``` **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: Passing `-w 300` to iptables tells it to wait up to 5 minutes to acquire the xtables lock, rather than aborting immediately. **Release note**: ```release-note NONE ```
parents e93b049b 47f44f58
...@@ -854,7 +854,7 @@ def fix_iptables_for_docker_1_13(): ...@@ -854,7 +854,7 @@ def fix_iptables_for_docker_1_13():
https://github.com/kubernetes/kubernetes/issues/40182 https://github.com/kubernetes/kubernetes/issues/40182
https://github.com/kubernetes/kubernetes/issues/39823 https://github.com/kubernetes/kubernetes/issues/39823
""" """
cmd = ['iptables', '-P', 'FORWARD', 'ACCEPT'] cmd = ['iptables', '-w', '300', '-P', 'FORWARD', 'ACCEPT']
check_call(cmd) check_call(cmd)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment