Skip to content
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: DockerSwarmSuite.TestPruneNetwork #27866

Closed
tophj-ibm opened this issue Oct 28, 2016 · 6 comments · Fixed by #27938
Closed

Flaky test: DockerSwarmSuite.TestPruneNetwork #27866

tophj-ibm opened this issue Oct 28, 2016 · 6 comments · Fixed by #27938

Comments

@tophj-ibm
Copy link
Contributor

tophj-ibm commented Oct 28, 2016

Seen flakily failing on arm and ppc64le.

----------------------------------------------------------------------
FAIL: docker_cli_prune_unix_test.go:26: DockerSwarmSuite.TestPruneNetwork

[d4ebd159337da] waiting for daemon to start
[d4ebd159337da] daemon started
docker_cli_prune_unix_test.go:35:
    c.Assert(err, checker.IsNil)
... value *exec.ExitError = &exec.ExitError{ProcessState:(*os.ProcessState)(0xc4205245a0), Stderr:[]uint8(nil)} ("exit status 1")

[d4ebd159337da] exiting daemon

----------------------------------------------------------------------

unfortunately the Jenkins logs were deleted as I was making this, but I'm seeing it on my local power machine on master as well.

@tophj-ibm
Copy link
Contributor Author

hmm looks like a network isn't being cleaned up correctly, from failing docker.log here https://gist.github.com/tophj-ibm/bd415b07affffd124eee5e45ac82e408

time="2016-10-28T19:02:59.242218000Z" level=debug msg=""Calling POST /v1.25/networks/create"
time="2016-10-28T19:02:59.242366000Z" level=debug msg="form data: {\"Attachable\":false,\"CheckDuplicate\":true,\"Driver\":\"overlay\",\"EnableIPv6\":false,\"IPAM\":{\"Config\":[],\"Driver\":\"default\",\"Options\":{}},\"Internal\":false,\"Labels\":{},\"Name\":\"n4\",\"Options\":{}}"
time="2016-10-28T19:02:59.243590000Z" level=error msg="Handler for POST /v1.25/networks/create returned error: network with name n4 already exists"

@thaJeztah
Copy link
Member

This test was added in #27525

ping @AkihiroSuda ptal

@AkihiroSuda
Copy link
Member

https://jenkins.dockerproject.org/job/Docker%20Master%20(arm)/3558/console seems hitting this.

But AFAIK no test other than TestPruneNetwork creates a network named "n4"...

(bundle: https://jenkins.dockerproject.org/job/Docker%20Master%20(arm)/3571/)

$ find bundles -name docker.log | xargs grep '\\"n4\\"'
bundles/1.13.0-dev/test-integration-cli/d8e3bfbf769bf/docker.log:time="2016-10-29T20:02:58.304429896Z" level=debug msg="form data: {\"Attachable\":false,\"CheckDuplicate\":true,\"Driver\":\"overlay\",\"EnableIPv6\":false,\"IPAM\":{\"Config\":[],\"Driver\":\"default\",\"Options\":{}},\"Internal\":false,\"Labels\":{},\"Name\":\"n4\",\"Options\":{}}"
^
|
+---- this is the log for TestPruneNetwork

Maybe the error string "error: network with name n4 already exists" is wrong, but not sure yet.
Trying to reproduce..

@AkihiroSuda
Copy link
Member

AkihiroSuda commented Oct 31, 2016

Reproduced during BUILDFLAGS="-race" TESTFLAGS='-check.f TestPrune -test.count 100' make test-integration-cli, on Ubuntu 16.10, kernel 4.8.0-26-generic, x86_64

So the test failure is

  • Not related to any other test
  • Not related to arm nor ppc64le

Looking at the log (mine and @tophj-ibm 's #27866 (comment)) , the failure is caused when the ID of the ingress starts with n%d..

e.g.

Allocating IPv4 pools for network ingress (n4whp4a1b4bkgw23akoamblhz)

The ID is generated from here; it occasionally creates a network named n%d: https://github.com/docker/docker/blob/12a4ed03178982fec44b75479c3e63a316503d90/vendor/src/github.com/docker/swarmkit/identity/randomid.go#L44
(cc @aaronlehmann @stevvooe )

@AkihiroSuda
Copy link
Member

AkihiroSuda commented Oct 31, 2016

I'll try to open PR that allows to create a network of which name is the prefix of the ID of the ingress.

AkihiroSuda added a commit to AkihiroSuda/docker that referenced this issue Nov 1, 2016
…f a swarm network

Previously, it doesn't allow creating such a network:

e.g.

    $ docker network inspect -f '{{.Id}}' ingress
    84xh9knigj6zyt00u31e26nj3
    $ docker network create 84
    Error response from daemon: network with name 84 already exists

Fix moby#27866

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
@AkihiroSuda
Copy link
Member

opened #27938

AkihiroSuda added a commit to AkihiroSuda/docker that referenced this issue Nov 3, 2016
…f a swarm network

Previously, it doesn't allow creating such a network:

e.g.

    $ docker network inspect -f '{{.Id}}' ingress
    84xh9knigj6zyt00u31e26nj3
    $ docker network create 84
    Error response from daemon: network with name 84 already exists

Fix moby#27866

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
AkihiroSuda added a commit to AkihiroSuda/docker that referenced this issue Dec 15, 2016
…f a swarm network

Previously, it doesn't allow creating such a network:

e.g.

    $ docker network inspect -f '{{.Id}}' ingress
    84xh9knigj6zyt00u31e26nj3
    $ docker network create 84
    Error response from daemon: network with name 84 already exists

Fix moby#27866

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
vieux pushed a commit that referenced this issue Dec 16, 2016
…f a swarm network

Previously, it doesn't allow creating such a network:

e.g.

    $ docker network inspect -f '{{.Id}}' ingress
    84xh9knigj6zyt00u31e26nj3
    $ docker network create 84
    Error response from daemon: network with name 84 already exists

Fix #27866

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit edfbc3b)
Signed-off-by: Victor Vieux <vieux@docker.com>
xianlubird pushed a commit to xianlubird/docker that referenced this issue Dec 23, 2016
…f a swarm network

Previously, it doesn't allow creating such a network:

e.g.

    $ docker network inspect -f '{{.Id}}' ingress
    84xh9knigj6zyt00u31e26nj3
    $ docker network create 84
    Error response from daemon: network with name 84 already exists

Fix moby#27866

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants