vendor: docker/libnetwork b3507428be5b458cb0e2b4086b13531fb0706e46#41908
Conversation
b3c7687 to
43abca6
Compare
|
@arkodg PTAL; can you check if I have the correct "fixes" in place or if I missed any / linked the wrong ones? |
|
Lots of failures; look related / legit failures; |
|
@bboehmke PTAL |
is caused because the I think this is caused because the On creation the For the IPv6 userland proxy the |
|
failure 3 failure 4 failure 5 failure 6 I think they are caused because the container now also shows the IPv6 publish (previously only IPv4). |
|
failure 7: similar to the ones before but this time it expects that the binding is only correct if there is exactly one binding: The inspect output would look like this: "Ports": {
"80/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "80"
},
{
"HostIp": "::",
"HostPort": "80"
}
]
},
|
|
Sadly for the second one I have no idea what is going on. Sadly I don't think I will have the time to fix this on my own in the next days. |
|
thanks for triaging the issues @bboehmke ! The port bindings have now been split up into 2 - for ipv4 and ipv6
|
Looks like we should at least mention that in the changelog. Also /cc @simonferquel @djs55 as I think Docker Desktop makes use of that information to setup networking |
updated the commit to include that PR. Will have a look later at fixing the tests |
43abca6 to
64d023c
Compare
|
Looks like this failure is an issue in rootless kit; Probably somewhere in this function, which doesn't look to be handling IPv6 addresses; https://github.com/rootless-containers/rootlesskit/blob/27c9611a3931149dd91fabd2d559140c351bf36f/pkg/port/portutil/portutil.go#L13-L15 |
|
I thought I'd have a look at the rootless kit code (thought; replace with the go-connections code used in Docker and Libnetwork), but I think this change; rootless-containers/rootlesskit#207 is problematic; the "port spec" string format is already ambiguous in docker ( |
64d023c to
f29af39
Compare
$ docker --context=rootless run --rm -p 8080:80 nginx:alpine
docker: Error response from daemon: driver failed programming external connectivity on endpoint vigorous_archimedes (8ca94868817b1f0398ae1c96aa4caa3eedc60753b826797ce164fa33a159a966): Error starting userland proxy: error while calling PortManager.AddPort(): listen tcp 0.0.0.0:8080: bind: address already in use.$ sudo execsnoop.bt
Attaching 2 probes...
TIME(ms) PID ARGS
22491 43131 docker --context=rootless run --rm -p 8080:80 nginx:alpine
22542 43141 /sbin/iptables --wait -t nat -C DOCKER -p tcp -d 0/0 --dport 8080 -j DNAT --to-destination 172.17.0.2:80
22545 43142 /sbin/iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8080 -j DNAT --to-destination 172.17.0.2:80
22547 43143 /sbin/iptables --wait -t filter -C DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.2 --dport
22548 43144 /sbin/iptables --wait -t filter -A DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.2 --dport
22550 43145 /sbin/iptables --wait -t nat -C POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 80 -j MASQUERADE
22551 43146 /sbin/iptables --wait -t nat -A POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 80 -j MASQUERADE
22553 43147 /usr/local/bin/rootlesskit-docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8080 -container-ip 172.17.0.2 -container-port 80
22555 43152 docker-proxy -container-ip 172.17.0.2 -container-port 80 -host-ip 127.0.0.1 -host-port 8080 -proto tcp
22556 43160 /usr/local/bin/rootlesskit-docker-proxy -proto tcp -host-ip :: -host-port 8080 -container-ip 172.17.0.2 -container-port 80
22564 43167 /sbin/iptables --wait -t nat -C DOCKER -p tcp -d 0/0 --dport 8080 -j DNAT --to-destination 172.17.0.2:80
22568 43168 /sbin/iptables --wait -t nat -D DOCKER -p tcp -d 0/0 --dport 8080 -j DNAT --to-destination 172.17.0.2:80
22571 43169 /sbin/iptables --wait -t filter -C DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.2 --dport
22573 43170 /sbin/iptables --wait -t filter -D DOCKER ! -i docker0 -o docker0 -p tcp -d 172.17.0.2 --dport
22574 43171 /sbin/iptables --wait -t nat -C POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 80 -j MASQUERADE
22576 43172 /sbin/iptables --wait -t nat -D POSTROUTING -p tcp -s 172.17.0.2 -d 172.17.0.2 --dport 80 -j MASQUERADE
Seems a bug on libnetwork side. |
|
@AkihiroSuda the behavior in libnetwork has recently changed to spawn a separate |
|
Opened rootless-containers/rootlesskit#231 for discussion |
|
Please try this version of RootlessKit: rootless-containers/rootlesskit#232 |
24b7ffe to
f90314f
Compare
|
included #42102 to test |
f90314f to
72991ac
Compare
72991ac to
62cb4b2
Compare
62cb4b2 to
b072776
Compare
|
Rebased; this should be ready for review: @AkihiroSuda @tonistiigi @tiborvass @cpuguy83 ptal |
The normalizing was updated with the output of the "docker port" command
in mind, but we're normalizing the "expected" output, which is passed
without the "->" in front of the mapping, causing some tests to fail;
=== RUN TestDockerSuite/TestPortHostBinding
--- FAIL: TestDockerSuite/TestPortHostBinding (1.21s)
docker_cli_port_test.go:324: assertion failed: error is not nil: |:::9876!=[::]:9876|
=== RUN TestDockerSuite/TestPortList
--- FAIL: TestDockerSuite/TestPortList (0.96s)
docker_cli_port_test.go:25: assertion failed: error is not nil: |:::9876!=[::]:9876|
Signed-off-by: Sebastiaan van Stijn <[email protected]>
full diff: moby/libnetwork@fa125a3...b350742 - fixed IPv6 iptables rules for enabled firewalld (libnetwork#2609) - fixes "Docker uses 'iptables' instead of 'ip6tables' for IPv6 NAT rule, crashes" - Fix regression in docker-proxy - introduced in "Fix IPv6 Port Forwarding for the Bridge Driver" (libnetwork#2604) - fixes/addresses: "IPv4 and IPv6 addresses are not bound by default anymore" (libnetwork#2607) - fixes/addresses "IPv6 is no longer proxied by default anymore" (moby#41858) - Use hostIP to decide on Portmapper version - fixes docker-proxy not being stopped correctly Port mapping of containers now contain separatet mappings for IPv4 and IPv6 addresses, when listening on "any" IP address. Various tests had to be updated to take multiple mappings into account. Signed-off-by: Sebastiaan van Stijn <[email protected]>
b072776 to
0450728
Compare
| old := strings.Replace(mapping, "-> [", "-> ", 1) | ||
| old := strings.Replace(mapping, "[", "", 1) |
There was a problem hiding this comment.
I made the normalisation too strict in #42050, and forgot the "expected" format was sometimes passed as a "full" format (80/tcp -> [::]:80), and sometimes only the mapping ([::]:80); pushed this fix as a separate commit in this PR, but I can move to a separate PR if we think that makes more sense
|
ok this is all green now; also prepared a draft backport for 20.10 #42205 |
vendor: docker/libnetwork b3507428be5b458cb0e2b4086b13531fb0706e46 Signed-off-by: wuguoguoya <[email protected]>
vendor: docker/libnetwork b3507428be5b458cb0e2b4086b13531fb0706e46 Signed-off-by: wuguoguoya <[email protected]>
also somewhat related to #28589, which discusses the "implicit" binding of IPv6
depends on:
[DNM] trigger CI with rootlesskit v0.14.0-pre #42102update rootlesskit to v0.14.0 #42179 update rootlesskit to v0.14.0full diff: moby/libnetwork@fa125a3...b350742
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)