rancher / convoy

A Docker volume plugin, managing persistent container volumes.
Apache License 2.0
1.31k stars 135 forks source link

creating volume returns error #163

Open popopanda opened 8 years ago

popopanda commented 8 years ago

Hello,

I'm trying to use convoy to create ebs volumes and attach to my instance for my docker containers to use. Following the documentation, and running the command sudo convoy create voltest returns:

ERRO[0005] Get http://%!F(MISSING)var%!F(MISSING)run%!F(MISSING)convoy%!F(MISSING)convoy.sock/v1/volumes/: EOF { "Error": "Get http://%!F(MISSING)var%!F(MISSING)run%!F(MISSING)convoy%!F(MISSING)convoy.sock/v1/volumes/: EOF" }

However, checking in ebs volumes, I can see the ebs volume was created, and attached to the instance, but running other commands such as sudo convoy inspect voltest returns the same error message

using: Docker version 1.9.1, build a34a1d5 convoy version v0.5.0 CentOS Linux release 7.2.1511 (Core)

Thanks!

popopanda commented 8 years ago

Actually, I was running sudo convoy daemon --drivers ebs as a systemd unit.

stopping that service unit, and running sudo convoy daemon --drivers ebs & then running sudo convoy create myvol

returns:

DEBU[0012] Calling: POST, /volumes/create, request: POST, /v1/volumes/create  pkg=daemon
DEBU[0012]                                               event=create object=volume opts=map[VolumeIOPS:0 PrepareForVM:false Size:0 BackupURL: VolumeName:voltest VolumeDriverID: VolumeType:] pkg=daemon reason=prepare volume=voltest
DEBU[0017] Adding tags for vol-8171d954, as map[Name:voltest]  pkg=ebs
DEBU[0017] Created volume voltest from EBS volume vol-8171d954  pkg=ebs
DEBU[0018] Attaching vol-8171d954 to i-52d3b163's /dev/sdj  pkg=ebs
DEBU[0024] Attached EBS volume vol-8171d954 to /dev/xvdj  pkg=ebs
DEBU[0025] Created volume                                event=create object=volume pkg=daemon reason=complete volume=voltest
2016/09/14 17:08:22 http: panic serving @: runtime error: invalid memory address or nil pointer dereference
goroutine 26 [running]:
net/http.(*conn).serve.func1(0xc820156180)
    /usr/local/go/src/net/http/server.go:1389 +0xc1
panic(0xb3fcc0, 0xc820010100)
    /usr/local/go/src/runtime/panic.go:443 +0x4e9
github.com/rancher/convoy/ebs.(*Driver).GetVolumeInfo(0xc8200652c0, 0xc8201583f0, 0x7, 0x0, 0x0, 0x0)
    /go/src/github.com/rancher/convoy/ebs/ebs.go:501 +0x898
github.com/rancher/convoy/daemon.(*daemon).getVolumeDriverInfo(0xc820080500, 0xc820460340, 0xc820460340, 0x0, 0x0)
    /go/src/github.com/rancher/convoy/daemon/volume.go:303 +0xbb
github.com/rancher/convoy/daemon.(*daemon).doVolumeCreate(0xc820080500, 0xc55960, 0x1, 0x7f12dacbf278, 0xc82015c0d0, 0xc8201fc000, 0xc82014a330, 0x0, 0x0)
    /go/src/github.com/rancher/convoy/daemon/volume.go:157 +0x133
github.com/rancher/convoy/daemon.(*daemon).(github.com/rancher/convoy/daemon.doVolumeCreate)-fm(0xc55960, 0x1, 0x7f12dacbf278, 0xc82015c0d0, 0xc8201fc000, 0xc82014a330, 0x0, 0x0)
    /go/src/github.com/rancher/convoy/daemon/daemon.go:76 +0x74
github.com/rancher/convoy/daemon.makeHandlerFunc.func1(0x7f12dacbf278, 0xc82015c0d0, 0xc8201fc000)
    /go/src/github.com/rancher/convoy/daemon/daemon.go:142 +0x29d
net/http.HandlerFunc.ServeHTTP(0xc82018c280, 0x7f12dacbf278, 0xc82015c0d0, 0xc8201fc000)
    /usr/local/go/src/net/http/server.go:1618 +0x3a
github.com/rancher/convoy/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc820065360, 0x7f12dacbf278, 0xc82015c0d0, 0xc8201fc000)
    /go/src/github.com/rancher/convoy/vendor/github.com/gorilla/mux/mux.go:98 +0x29e
net/http.serverHandler.ServeHTTP(0xc8201bae00, 0x7f12dacbf278, 0xc82015c0d0, 0xc8201fc000)
    /usr/local/go/src/net/http/server.go:2081 +0x19e
net/http.(*conn).serve(0xc820156180)
    /usr/local/go/src/net/http/server.go:1472 +0xf2e
created by net/http.(*Server).Serve
    /usr/local/go/src/net/http/server.go:2137 +0x44e
ERRO[0018] Post http://%!F(MISSING)var%!F(MISSING)run%!F(MISSING)convoy%!F(MISSING)convoy.sock/v1/volumes/create: EOF
{
    "Error": "Post http://%!F(MISSING)var%!F(MISSING)run%!F(MISSING)convoy%!F(MISSING)convoy.sock/v1/volumes/create: EOF"
}
joskfg commented 8 years ago

I have the same error

DEBU[0087] Calling: POST, /volumes/create, request: POST, /v1/volumes/create  pkg=daemon
DEBU[0087]                                               event=create object=volume opts=map[VolumeDriverID: VolumeType: VolumeIOPS:0 PrepareForVM:false Size:0 BackupURL: VolumeName:volume_name] pkg=daemon reason=prepare volume=volume_name
DEBU[0093] Adding tags for vol-ba6c9138, as map[Name:volume_name]  pkg=ebs
DEBU[0093] Created volume volume_name from EBS volume vol-ba6c9138  pkg=ebs
DEBU[0093] Attaching vol-ba6c9138 to i-9b0ee4aa's /dev/sdh  pkg=ebs
DEBU[0098] Attached EBS volume vol-ba6c9138 to /dev/xvdh  pkg=ebs
DEBU[0100] Created volume                                event=create object=volume pkg=daemon reason=complete volume=volume_name
2016/09/18 20:30:38 http: panic serving @: runtime error: invalid memory address or nil pointer dereference
goroutine 27 [running]:
net/http.(*conn).serve.func1(0xc8201f2580)
    /usr/local/go/src/net/http/server.go:1389 +0xc1
panic(0xb3fcc0, 0xc8200140e0)
    /usr/local/go/src/runtime/panic.go:443 +0x4e9
github.com/rancher/convoy/ebs.(*Driver).GetVolumeInfo(0xc820168280, 0xc8201ecb10, 0xb, 0x0, 0x0, 0x0)
    /go/src/github.com/rancher/convoy/ebs/ebs.go:501 +0x898
github.com/rancher/convoy/daemon.(*daemon).getVolumeDriverInfo(0xc820080500, 0xc8203c9800, 0xc8203c9800, 0x0, 0x0)
    /go/src/github.com/rancher/convoy/daemon/volume.go:303 +0xbb
github.com/rancher/convoy/daemon.(*daemon).doVolumeCreate(0xc820080500, 0xc55960, 0x1, 0x7f7bd2a28910, 0xc820165040, 0xc820175dc0, 0xc8201ea750, 0x0, 0x0)
    /go/src/github.com/rancher/convoy/daemon/volume.go:157 +0x133
github.com/rancher/convoy/daemon.(*daemon).(github.com/rancher/convoy/daemon.doVolumeCreate)-fm(0xc55960, 0x1, 0x7f7bd2a28910, 0xc820165040, 0xc820175dc0, 0xc8201ea750, 0x0, 0x0)
    /go/src/github.com/rancher/convoy/daemon/daemon.go:76 +0x74
github.com/rancher/convoy/daemon.makeHandlerFunc.func1(0x7f7bd2a28910, 0xc820165040, 0xc820175dc0)
    /go/src/github.com/rancher/convoy/daemon/daemon.go:142 +0x29d
net/http.HandlerFunc.ServeHTTP(0xc82014cd40, 0x7f7bd2a28910, 0xc820165040, 0xc820175dc0)
    /usr/local/go/src/net/http/server.go:1618 +0x3a
github.com/rancher/convoy/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc820168320, 0x7f7bd2a28910, 0xc820165040, 0xc820175dc0)
    /go/src/github.com/rancher/convoy/vendor/github.com/gorilla/mux/mux.go:98 +0x29e
net/http.serverHandler.ServeHTTP(0xc8201f2400, 0x7f7bd2a28910, 0xc820165040, 0xc820175dc0)
    /usr/local/go/src/net/http/server.go:2081 +0x19e
net/http.(*conn).serve(0xc8201f2580)
    /usr/local/go/src/net/http/server.go:1472 +0xf2e
created by net/http.(*Server).Serve
    /usr/local/go/src/net/http/server.go:2137 +0x44e
minisaw commented 8 years ago

same issue

Josh-West-Bose commented 8 years ago

Same here

gsethu commented 8 years ago

Same issue reported in the rancher forum.

https://forums.rancher.com/t/convoy-ebs-with-rancher/4127

yasker commented 8 years ago

Hi,

Can you try the latest Convoy in master? It suppose to be fixed by https://github.com/rancher/convoy/pull/172

gsethu commented 8 years ago

Hi yasker,

Can you provide the link to download the latest convoy ? Thanks

yasker commented 8 years ago

@gsethu We haven't had a release for it yet, you can download the latest and hit make, binary will be at <dir>/bin

gsethu commented 8 years ago

Hi Yasker,

With the latest convoy from the master it is working fine. Able to create convoy volume successfully and attach it to containers.

convoy create convoy-vol04

convoy-vol04

By default, convoy doesn't seems to be running as a background process; need to start it using nohup and redirect the logs to a file manually. Would be good to have it run in the background and collect the logs to specific location. Correct me if I am missing any configuration

convoy daemon --drivers ebs

DEBU[0000] Found existing config. Ignoring command line opts, loading config from /var/lib/rancher/convoy pkg=daemon DEBU[0000] driver=ebs driver_opts=map[] event=init pkg=daemon reason=prepare root=/var/lib/rancher/convoy DEBU[0000] driver=ebs event=init pkg=daemon reason=complete DEBU[0030] Registering GET, /volumes/ pkg=daemon DEBU[0030] Registering GET, /snapshots/ pkg=daemon

....

Can you pls clarify the following :

1) If I need to use convoy-ebs with rancher, do I need to have the convoy daemon running on every single host managed by Rancher or can we have the convoy daemon running just in the Rancher Master Server ?

timiil commented 7 years ago

same issue , convoy create | list all say nothing but EOF failed, and i can not make the newest master source code, so it is suck.