Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Panic in weaveproxy when starting container with 'null' HostConfig #1481

Closed
2opremio opened this issue Sep 30, 2015 · 0 comments
Closed

Panic in weaveproxy when starting container with 'null' HostConfig #1481

2opremio opened this issue Sep 30, 2015 · 0 comments
Assignees
Milestone

Comments

@2opremio
Copy link
Contributor

The weave proxy (master) panics when running the ECS demo. It works with Weave 1.1.

Here are the weaveproxy logs:

INFO: 2015/09/30 11:12:49.620486 weave proxy git-d5c85a3d53f4
INFO: 2015/09/30 11:12:49.620619 Command line arguments: --hostname-from-label com.amazonaws.ecs.container-name -H unix:///var/run/weave.sock
INFO: 2015/09/30 11:12:49.621511 [docker] Using Docker API on unix:///var/run/docker.sock: &[KernelVersion=3.14.48-33.39.amzn1.x86_64 Os=linux Version=1.6.2 ApiVersion=1.18 Arch=amd64 GitCommit=7c8fca2/1.6.2 GoVersion=go1.3.3]
INFO: 2015/09/30 11:12:49.669784 proxy listening on unix:///var/run/weave.sock
INFO: 2015/09/30 11:12:50.117858 GET /v1.15/version
INFO: 2015/09/30 11:12:50.118814 GET /v1.15/_ping
INFO: 2015/09/30 11:12:50.125716 GET /v1.15/images/json?all=1
INFO: 2015/09/30 11:12:50.268669 GET /v1.15/version
INFO: 2015/09/30 11:12:50.296761 GET /v1.15/_ping
INFO: 2015/09/30 11:12:50.311062 GET /v1.15/containers/json?all=1&filters=%7B%22status%22%3A%5B%5D%7D
INFO: 2015/09/30 11:12:50.314112 DELETE /v1.15/containers/c9e5e0774ee4b7790e5ba39f8a3b1bd85c3106d49145b2ba24b1e76cc105caa1?force=1
INFO: 2015/09/30 11:12:50.826403 POST /v1.15/containers/create?hostconfig=%7B%22Binds%22%3A%5B%22%2Fvar%2Frun%2Fweave.sock%3A%2Fvar%2Frun%2Fdocker.sock%22%2C%22%2Fvar%2Flog%2Fecs%3A%2Flog%22%2C%22%2Fvar%2Flib%2Fecs%2Fdata%3A%2Fdata%22%2C%22%2Fetc%2Fecs%3A%2Fetc%2Fecs%22%2C%22%2Fvar%2Fcache%2Fecs%3A%2Fvar%2Fcache%2Fecs%22%2C%22%2Fcgroup%3A%2Fcgroup%3Aro%22%2C%22%2Fvar%2Frun%2Fdocker%2Fexecdriver%3A%2Fvar%2Flib%2Fdocker%2Fexecdriver%3Aro%22%5D%2C%22PortBindings%22%3A%7B%2251678%2Ftcp%22%3A%5B%7B%22HostIP%22%3A%22127.0.0.1%22%2C%22HostPort%22%3A%2251678%22%7D%5D%7D%2C%22RestartPolicy%22%3A%7B%7D%7D&name=ecs-agent
INFO: 2015/09/30 11:12:50.826642 Creating container with WEAVE_CIDR ""
INFO: 2015/09/30 11:12:50.990839 POST /v1.15/containers/a76874480e48949c309c0b644f54e832f268a5115cbd8c52f64d9b1120b2ee94/start
2015/09/30 11:12:50 http: panic serving @: runtime error: invalid memory address or nil pointer dereference
goroutine 34 [running]:
net/http.func·011()
    /usr/local/go/src/net/http/server.go:1130 +0xbb
github.com/weaveworks/weave/proxy.(*Proxy).addWeaveWaitVolume(0xc20805cb00, 0x0)
    /home/go/src/github.com/weaveworks/weave/proxy/proxy.go:392 +0x4d9
github.com/weaveworks/weave/proxy.(*startContainerInterceptor).InterceptRequest(0xc2080367c0, 0xc2092fa410, 0x0, 0x0)
    /home/go/src/github.com/weaveworks/weave/proxy/start_container_interceptor.go:31 +0x2f5
github.com/weaveworks/weave/proxy.(*Proxy).Intercept(0xc20805cb00, 0x7ff501ad2730, 0xc2080367c0, 0x7ff501ad2068, 0xc2090fbea0, 0xc2092fa410)
    /home/go/src/github.com/weaveworks/weave/proxy/proxy_intercept.go:18 +0x4c
github.com/weaveworks/weave/proxy.(*Proxy).ServeHTTP(0xc20805cb00, 0x7ff501ad2068, 0xc2090fbea0, 0xc2092fa410)
    /home/go/src/github.com/weaveworks/weave/proxy/proxy.go:167 +0x259
net/http.serverHandler.ServeHTTP(0xc20800d4a0, 0x7ff501ad2068, 0xc2090fbea0, 0xc2092fa410)
    /usr/local/go/src/net/http/server.go:1703 +0x19a
net/http.(*conn).serve(0xc2090fbe00)
    /usr/local/go/src/net/http/server.go:1204 +0xb57
created by net/http.(*Server).Serve
    /usr/local/go/src/net/http/server.go:1751 +0x35e
@2opremio 2opremio assigned paulbellamy and 2opremio and unassigned paulbellamy Sep 30, 2015
@rade rade added this to the 1.2.0 milestone Sep 30, 2015
@2opremio 2opremio changed the title Panic in weaveproxy Panic in weaveproxy when starting container 'null' HostConfig Sep 30, 2015
@2opremio 2opremio changed the title Panic in weaveproxy when starting container 'null' HostConfig Panic in weaveproxy when starting container with 'null' HostConfig Sep 30, 2015
@rade rade closed this as completed in #1488 Oct 1, 2015
rade added a commit that referenced this issue Oct 1, 2015
[proxy] Handle null HostConfigs gracefully in start

Fixes #1481.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants