Skip to content

Vendoring in libnetwork 2da2dc055de5a474c8540871ad88a48213b0994f#13518

Merged
icecrime merged 1 commit intomoby:masterfrom
mrjana:clone
May 28, 2015
Merged

Vendoring in libnetwork 2da2dc055de5a474c8540871ad88a48213b0994f#13518
icecrime merged 1 commit intomoby:masterfrom
mrjana:clone

Conversation

@mrjana
Copy link
Copy Markdown
Contributor

@mrjana mrjana commented May 27, 2015

Fixes #13498

Signed-off-by: Jana Radhakrishnan mrjana@docker.com

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add unit here 60 * time.Second

@jessfraz
Copy link
Copy Markdown
Contributor

upgrading the servers ;) going to give this bad boy a spin

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove defer and put it at end of function

@tiborvass
Copy link
Copy Markdown
Contributor

@mrjana what happens if docker quits before routine cleanup?

@mrjana
Copy link
Copy Markdown
Contributor Author

mrjana commented May 27, 2015

@tiborvass when we come back up we cleanup the stale paths in cleanupNamespaceFiles

@jessfraz
Copy link
Copy Markdown
Contributor

panic in the unit-tests

+ go test -test.timeout=30m github.com/docker/docker/pkg/httputils
--- FAIL: TestResumableRequestReader (0.00s)
panic: httptest: failed to listen on a port: listen tcp6 [::1]:0: bind: cannot assign requested address [recovered]
    panic: httptest: failed to listen on a port: listen tcp6 [::1]:0: bind: cannot assign requested address

goroutine 7 [running]:
testing.func·006()
    /usr/local/go/src/testing/testing.go:441 +0x181
net/http/httptest.newLocalListener(0x0, 0x0)
    /usr/local/go/src/net/http/httptest/server.go:68 +0x457
net/http/httptest.NewUnstartedServer(0x7fd6135fa110, 0xc20802ad80, 0x7fd6135fa110)
    /usr/local/go/src/net/http/httptest/server.go:96 +0x1f
net/http/httptest.NewServer(0x7fd6135fa110, 0xc20802ad80, 0xac3578)
    /usr/local/go/src/net/http/httptest/server.go:83 +0x32
github.com/docker/docker/pkg/httputils.TestResumableRequestReader(0xc20800c120)
    /go/src/github.com/docker/docker/pkg/httputils/resumablerequestreader_test.go:18 +0xe5
testing.tRunner(0xc20800c120, 0xa9d9a0)
    /usr/local/go/src/testing/testing.go:447 +0xbf
created by testing.RunTests
    /usr/local/go/src/testing/testing.go:555 +0xa8b

goroutine 1 [chan receive]:
testing.RunTests(0x7c25a0, 0xa9d9a0, 0x2, 0x2, 0x100000001)
    /usr/local/go/src/testing/testing.go:556 +0xad6
testing.(*M).Run(0xc20802e460, 0xac2e40)
    /usr/local/go/src/testing/testing.go:485 +0x6c
main.main()
    github.com/docker/docker/pkg/httputils/_test/_testmain.go:102 +0x291

goroutine 5 [syscall]:
os/signal.loop()
    /usr/local/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
    /usr/local/go/src/os/signal/signal_unix.go:27 +0x35

Tests failed: ./pkg/httputils

+ go test -test.timeout=30m github.com/docker/docker/pkg/ioutils
PASS
coverage: 79.6% of statements

+ go test -test.timeout=30m github.com/docker/docker/

@jessfraz
Copy link
Copy Markdown
Contributor

so running this binary on the servers and testing this pr with it, i get

... Panic: httptest: failed to listen on a port: listen tcp6 [::1]:0: bind: cannot assign requested address (PC=0x43D7E5)

in like every other test-integration-cli test

@LK4D4
Copy link
Copy Markdown
Contributor

LK4D4 commented May 27, 2015

If GC will occur right after syscall.Umount what difference will be with old behavior?

@mrjana
Copy link
Copy Markdown
Contributor Author

mrjana commented May 27, 2015

@LK4D4 it's not that remove by itself is a problem. It's that when we make the kernel interleave between create namespace path and remove is when this problem happens. We make sure with this fix that remove and create never interleaves

@jessfraz
Copy link
Copy Markdown
Contributor

LGTM

@jessfraz
Copy link
Copy Markdown
Contributor

🎊

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what? :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrjana this should be without the defer :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah taking care of it :-)

@mrjana
Copy link
Copy Markdown
Contributor Author

mrjana commented May 27, 2015

@tiborvass @LK4D4 @vieux updated the PR taking care of the comments

@estesp estesp changed the title Vendoring in libnetwork a4d595b6e7e07c2cf6cf32ea1aae8a28080c01d4 Vendoring in libnetwork 60da50e183e6195ee770dec9c57193bd94cd34fc May 27, 2015
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's a supported use case, but I'm pretty sure reading some people start multiple daemons on a single host, and in this case this call might be very problematic.

@icecrime
Copy link
Copy Markdown
Contributor

I think the cleanup logic is fine, but I'm afraid somebody, somewhere, will complain that it breaks running multiple daemon on a single host (was that @SvenDowideit?). I wish we didn't need in-memory state to manage collection, but I don't see an easy to query files to determine if they can safely be removed.

LGTM with a less than 100% confidence ;-) It's already great news that you managed to workaround those kernel bugs: that unblocks 1.7.0-rc1, we can refine if the cleanup logic becomes problematic.

@mrjana
Copy link
Copy Markdown
Contributor Author

mrjana commented May 27, 2015

@icecrime if the multiple daemons in a single host is a supported configuration then this could be problematic. Let me think about it a bit more. May be we can rework this a bit after 1.70-rc1?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this be settable? I wonder whether --exec-root which defaults to /var/run/docker should set this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now this is not settable. We can make this settable as an enhancement in the future

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
@mavenugo mavenugo changed the title Vendoring in libnetwork 60da50e183e6195ee770dec9c57193bd94cd34fc Vendoring in libnetwork 2da2dc055de5a474c8540871ad88a48213b0994f May 28, 2015
@icecrime
Copy link
Copy Markdown
Contributor

So now the trade-off is that uncleanly exiting the daemon will leave dangling files behind. Not ideal, but good enough for 1.7.0?

Still LGTM.

@vieux
Copy link
Copy Markdown
Contributor

vieux commented May 28, 2015

LGTM

@vieux
Copy link
Copy Markdown
Contributor

vieux commented May 28, 2015

It'll be improved in RC2

@mrjana
Copy link
Copy Markdown
Contributor Author

mrjana commented May 28, 2015

@icecrime but only for those container which haven't been restarted and only until a system reboot. But may be we can make it better

@icecrime
Copy link
Copy Markdown
Contributor

Alright, let's do this ;-)

icecrime pushed a commit that referenced this pull request May 28, 2015
Vendoring in libnetwork 2da2dc055de5a474c8540871ad88a48213b0994f
@icecrime icecrime merged commit c2e8f07 into moby:master May 28, 2015
@tiborvass
Copy link
Copy Markdown
Contributor

----------------------------------------------------------------------
FAIL: docker_cli_run_unix_test.go:162: DockerSuite.TestRunDeviceDirectory

docker_cli_run_unix_test.go:168:
    c.Fatal(err, out)
... Error: exit status 1Error response from daemon: Cannot start container 73017df47d63f1c30f8af70f742fef0ba9f7ef3c45a4431d78c1e8a289b0a9e6: error gathering device information while adding custom device "/dev/snd": lstat /dev/snd: no such file or directory

not sure if its related

@mrjana
Copy link
Copy Markdown
Contributor Author

mrjana commented May 28, 2015

@tiborvass that happens when you don't have /dev/snd in your machine

@tiborvass
Copy link
Copy Markdown
Contributor

----------------------------------------------------------------------
FAIL: docker_cli_nat_test.go:61: DockerSuite.TestNetworkNat

docker_cli_nat_test.go:71:
    c.Fatalf("Failed to connect to server: %v (output: %q)", err, string(out))
... Error: Failed to connect to server: exit status 1 (output: "nc: timed out\n")

this is another one

@jessfraz
Copy link
Copy Markdown
Contributor

test network nat is super unstable it fails all the time for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libnetwork: kernel freeze/lock up

7 participants