kubernetes/pkg/util
Kubernetes Submit Queue 902d53d5e7 Merge pull request #43575 from dcbw/iptables-restore-lock
Automatic merge from submit-queue (batch tested with PRs 43575, 44672)

util/iptables: check for and use new iptables-restore 'wait' argument

iptables-restore did not previously perform any locking, meaning that
when callers (like kube-proxy) asked iptables-restore to write large
numbers of rules, the iptables-restore process might run in parallel
with other 'iptables' invocations in kubelet (hostports), docker,
and other software.  This causes errors like:

"CNI request failed with status 400: 'Failed to ensure that nat chain
POSTROUTING jumps to MASQUERADE: error checking rule: exit status 4:
iptables: Resource temporarily  unavailable."

or from Docker:

"Failed to allocate and map port 1095-1095: iptables failed:
iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 1095
-j DNAT --to-destination 10.1.0.2:1095 ! -i lbr0: iptables:
Resource temporarily unavailable.\n (exit status 4)"

iptables-restore "wait" functionality was added in iptables git
commit 999eaa241212d3952ddff39a99d0d55a74e3639e which
is not yet in a release.

See also https://bugzilla.redhat.com/show_bug.cgi?id=1417234

@eparis @knobunc @kubernetes/rh-networking @kubernetes/sig-network-misc @freehan @thockin @brendandburns
2017-04-24 10:33:58 -07:00
..
async Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
bandwidth autogenerated 2017-04-14 10:40:57 -07:00
chmod Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
chown Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
config autogenerated 2017-04-14 10:40:57 -07:00
configz Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
crlf Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
dbus autogenerated 2017-04-14 10:40:57 -07:00
ebtables Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
env autogenerated 2017-04-14 10:40:57 -07:00
errors add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
exec Add support for attacher/detacher interface in Flex volume 2017-02-24 20:18:06 -05:00
flock pkg/util/flock: Fix the flock so it actually locks. 2017-03-13 14:24:59 -07:00
framer add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
goroutinemap autogenerated 2017-04-14 10:40:57 -07:00
hash Merge pull request #42085 from cblecker/gofmt-fix 2017-04-17 15:39:07 -07:00
i18n autogenerated 2017-04-14 10:40:57 -07:00
initsystem Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
interrupt Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
intstr move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
io autogenerated 2017-04-14 10:40:57 -07:00
ipconfig autogenerated 2017-04-14 10:40:57 -07:00
iptables Merge pull request #43575 from dcbw/iptables-restore-lock 2017-04-24 10:33:58 -07:00
json add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
keymutex autogenerated 2017-04-14 10:40:57 -07:00
labels autogenerated 2017-04-14 10:40:57 -07:00
limitwriter Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
logs autogenerated 2017-04-14 10:40:57 -07:00
maps Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
metrics autogenerated 2017-04-14 10:40:57 -07:00
mount autogenerated 2017-04-14 10:40:57 -07:00
net add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
netsh autogenerated 2017-04-14 10:40:57 -07:00
node autogenerated 2017-04-14 10:40:57 -07:00
oom autogenerated 2017-04-14 10:40:57 -07:00
parsers autogenerated 2017-04-14 10:40:57 -07:00
procfs autogenerated 2017-04-14 10:40:57 -07:00
rand move pkg/util/rand 2017-01-16 16:04:03 -05:00
removeall autogenerated 2017-04-14 10:40:57 -07:00
resourcecontainer autogenerated 2017-04-14 10:40:57 -07:00
rlimit Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
runtime add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
selinux autogenerated 2017-04-14 10:40:57 -07:00
sets add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
slice Smarter describer for generic resources 2017-04-17 15:42:47 -03:00
strings Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
sysctl Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
system autogenerated 2017-04-14 10:40:57 -07:00
tail Limit the size of the termination log and allow log input 2017-01-23 12:26:38 -05:00
taints autogenerated 2017-04-14 10:40:57 -07:00
term Merge pull request #44506 from caesarxuchao/fix-cross-build 2017-04-14 14:51:06 -07:00
threading autogenerated 2017-04-14 10:40:57 -07:00
tolerations Auto-generated stuff. 2017-04-06 16:15:34 -04:00
uuid Update generated files 2017-01-25 19:49:45 +01:00
validation add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
version Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
wait add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
workqueue/prometheus autogenerated 2017-04-14 10:40:57 -07:00
yaml add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
BUILD autogenerated 2017-04-14 10:40:57 -07:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
template.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
template_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
umask.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
umask_windows.go delete ErrorTimeout() function and modify Umask() args 2017-01-12 11:05:30 +08:00
util.go kubelet: storage: don't hang kubelet on unresponsive nfs 2016-10-18 08:45:40 -05:00
util_test.go pkg/util: move CompileRegex helper into apiserver 2017-01-25 17:21:12 +01:00