mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-18 16:21:13 +00:00
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 ```
This commit is contained in:
commit
741beb6453
@ -854,7 +854,7 @@ def fix_iptables_for_docker_1_13():
|
||||
https://github.com/kubernetes/kubernetes/issues/40182
|
||||
https://github.com/kubernetes/kubernetes/issues/39823
|
||||
"""
|
||||
cmd = ['iptables', '-P', 'FORWARD', 'ACCEPT']
|
||||
cmd = ['iptables', '-w', '300', '-P', 'FORWARD', 'ACCEPT']
|
||||
check_call(cmd)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user