moby / swarmkit

A toolkit for orchestrating distributed systems at any scale. It includes primitives for node discovery, raft-based consensus, task scheduling and more.
Apache License 2.0
3.35k stars 613 forks source link

make test failed #1936

Open huikang opened 7 years ago

huikang commented 7 years ago

Hi, I cloned the swarmkit repo and tried compiling it. I can compile the binaries successfully by make binaries. However, make outputs the following errors at the end. Did I miss any step? Thanks.

ection error: desc = \"transport: write unix @->/tmp/swarmkit-integration-236036193/control.sock: write: broken pipe\"; Reconnecting to {/tmp/swarmkit-integration-236036193/control.sock <nil>}" module=grpc 
time="2017-02-08T17:22:18Z" level=info msg="Manager shut down" module=node testnode=3 
time="2017-02-08T17:22:18Z" level=info msg="grpc: addrConn.resetTransport failed to create client transport: connection error: desc = \"transport: dial tcp 127.0.0.1:37638: getsockopt: connection refused\"; Reconnecting to {127.0.0.1:37638 <nil>}" module=grpc 
time="2017-02-08T17:22:18Z" level=info msg="Failed to dial /tmp/swarmkit-integration-496161064/control.sock: context canceled; please retry." module=grpc 
time="2017-02-08T17:22:18Z" level=info msg="Failed to dial 127.0.0.1:39954: context canceled; please retry." module=grpc 
time="2017-02-08T17:22:18Z" level=info msg="Failed to dial 127.0.0.1:37638: context canceled; please retry." module=grpc 
time="2017-02-08T17:22:18Z" level=info msg="Manager shut down" module=node testnode=2 
time="2017-02-08T17:22:18Z" level=info msg="grpc: addrConn.transportMonitor exits due to: context canceled" module=grpc 
--- FAIL: TestDemoteLeader (83.76s)
        Error Trace:    integration_test.go:117
            integration_test.go:366
    Error:      Received unexpected error worker node 3179m8yaxyapuov9p9xvpw3zi should not have manager status, returned &ManagerStatus{RaftID:6431592878202470898,Addr:127.0.0.1:39954,Leader:false,Reachability:UNREACHABLE,}
            github.com/docker/swarmkit/manager/state/raft/testutils.PollFuncWithTimeout
                /go/src/github.com/docker/swarmkit/manager/state/raft/testutils/testutils.go:76: polling failed

FAIL
FAIL    github.com/docker/swarmkit/integration  87.771s
Makefile:95: recipe for target 'integration' failed
make: *** [integration] Error 1
aaronlehmann commented 7 years ago

A few of the tests are a little unstable right now, and I'm working on improving them. Do you see the failure consistently?

We recently started running these integration tests in parallel, and I think this is exposing a few issues that didn't show up before.

In particular, I think tests like this one may be hitting the issue described here: https://github.com/docker/swarmkit/blob/master/manager/state/raft/raft.go#L1733-L1741

I am going to try and make this more robust, hopefully in the next day or two.