-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flaky test: libnetwork TestPortMappingV6Config (broken on ppc64le, s390x)? #42468
Comments
Hi, I'm new here and I was running the unit tests in Ubuntu 20.04. This unit test failed for me as well:
I noticed that the if statement on line 156 is checking for 6 port mappings, but portBindings only has 3 elements.
I hope that helps and feel free to correct me if I missed anything. I haven't looked into the warnings from this error message yet, but I'm not sure if they're related to the test failure. |
I think in tis case, it's because mappings for both IPv4 and IPv6 are enabled, so each port will be published twice |
Yeah, I knew I missed something. That fix would have been too easy. |
On few occasions
I think this test passes only when executed in a certain order although I don't get why since the test always run in its own net ns. For instance, using |
Since moby/libnetwork#2635 has been merged, allocatePortsInternal() checks if IPv6 is enabled by calling IsV6Listenable(). This function calls `net.Listen("tcp6", "[::1]:0")` and returns false when net.Listen() fails. TestPortMappingV6Config() starts by setting up a new net ns to run into it. The loopback interface is not bring up in this net ns, thus net.Listen() fails and IsV6Listenable() returns false. This change takes care of bringing loopback iface up right after moving to the new net ns. This test has been reported has flaky on s390x in moby#42468. For some reason, this test seems to be consistently green on the CI (on amd64 arch) and when running `hack/test/unit` locally. However it consistently fails when running `TESTFLAGS='-shuffle on' hack/test/unit` locally. Signed-off-by: Albin Kerouanton <[email protected]>
Since moby/libnetwork#2635 has been merged, allocatePortsInternal() checks if IPv6 is enabled by calling IsV6Listenable(). This function calls `net.Listen("tcp6", "[::1]:0")` and returns false when net.Listen() fails. TestPortMappingV6Config() starts by setting up a new net ns to run into it. The loopback interface is not bring up in this net ns, thus net.Listen() fails and IsV6Listenable() returns false. This change takes care of bringing loopback iface up right after moving to the new net ns. This test has been reported has flaky on s390x in moby#42468. For some reason, this test seems to be consistently green on the CI (on amd64 arch) and when running `hack/test/unit` locally. However it consistently fails when running `TESTFLAGS='-shuffle on' hack/test/unit` locally. Signed-off-by: Albin Kerouanton <[email protected]>
Since moby/libnetwork#2635 has been merged, allocatePortsInternal() checks if IPv6 is enabled by calling IsV6Listenable(). This function calls `net.Listen("tcp6", "[::1]:0")` and returns false when net.Listen() fails. TestPortMappingV6Config() starts by setting up a new net ns to run into it. The loopback interface is not bring up in this net ns, thus net.Listen() fails and IsV6Listenable() returns false. This change takes care of bringing loopback iface up right after moving to the new net ns. This test has been reported has flaky on s390x in moby#42468. For some reason, this test seems to be consistently green on the CI (on amd64 arch) and when running `hack/test/unit` locally. However it consistently fails when running `TESTFLAGS='-shuffle on' hack/test/unit` locally. Signed-off-by: Albin Kerouanton <[email protected]>
Hi, I am able to reproduce the error on Ubuntu 20.04 ppc64le and Ubuntu 20.04 x86 (Qemu VM) using branch master.
As reported by @thaJeztah , it seems some IPv6 networks are attempted, but not found. I confirm IPv6 is not activated in docker:
If I create a new IPv6 docker network, following https://docs.docker.com/config/daemon/ipv6/ first and next:
I can run tests using this network:
and test TestPortMappingV6Config passes. I have a side effect, the test TestDNSOptions fails, but it was related to So, as far as I know, this error is not related to docker itself, but to the machine configuration, and especially the fact IPv6 is activated or not in docker. PR 43017 does not seems to be enough to deal with this issue. |
Seen failing on: https://ci-next.docker.com/public/job/moby/job/PR-42071/20/execution/node/349/log/
Bundles:
ppc64le-integration-bundles.tar.gz
See https://ci-next.docker.com/public/blue/organizations/jenkins/moby/detail/PR-42325/6/tests
Looks like
modprobe
is not installed on the ppc64le machines (may have to install https://packages.debian.org/buster/kmod), causing thistest to fail. I think this was added in the libnetwork migration, so we should
fix this (either in the Jenkinsfile, or ideally update the machine configurations)
On s390x, the test is also failing, but not showing the
modprobe
error:The text was updated successfully, but these errors were encountered: