rancher / convoy

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

Unable to build from source #107

Closed shashankmjain closed 8 years ago

shashankmjain commented 8 years ago

I am unable to build convoy from source. Method getStacks is missing in some of the dependent library

shashankmjain commented 8 years ago

/root/.go/src/github.com/rancher/convoy/longhorn/longhorn.go:100: undefined: DockerComposeTemplate /root/.go/src/github.com/rancher/convoy/longhorn/longhorn.go:448: d.mdClient.GetStacks undefined (type *metadata.Client has no field or method GetStacks)

Is the exact error I get

cjellick commented 8 years ago

Hm. Are you using godeps to build?

yasker commented 8 years ago

@shashankmjain

I've fixed this issue with adding godep into Makefile.

Thanks.

shashankmjain commented 8 years ago

Thanks . Does it also resolve the getStacks not found. I looked into the metadata.go file and didnt find the method getStacks

yasker commented 8 years ago

@shashankmjain

It's a different metadata.go in Godeps.

shashankmjain commented 8 years ago

go get github.com/rancher/convoy returns this error

shashank/src/github.com/rancher/convoy/longhorn/longhorn.go:100: undefined: DockerComposeTemplate shashank/src/github.com/rancher/convoy/longhorn/longhorn.go:448: d.mdClient.GetStacks undefined (type *metadata.Client has no field or method GetStacks)

yasker commented 8 years ago

Please run make.

shashankmjain commented 8 years ago

Thanks. it builds fine now

shashankmjain commented 8 years ago

It builds but while running the daemon it gives error. DEBU[0000] Creating config at /var/lib/rancher/convoy pkg=daemon DEBU[0000] driver=devicemapper driver_opts=map[dm.metadatadev:/dev/loop3 dm.datadev:/dev/loop2] event=init pkg=daemon reason=prepare root=/var/lib/rancher/convoy DEBU[0000] libdevmapper(7): ioctl/libdm-iface.c:1724 (0) dm version OF 16384 DEBU[0000] libdevmapper(7): libdm-common.c:2105 (0) Udev cookie 0xd4d54d7 (semid 393216) created DEBU[0000] libdevmapper(7): libdm-common.c:2125 (0) Udev cookie 0xd4d54d7 (semid 393216) incremented to 1 DEBU[0000] libdevmapper(7): libdm-common.c:1997 (0) Udev cookie 0xd4d54d7 (semid 393216) incremented to 2 DEBU[0000] libdevmapper(7): libdm-common.c:2238 (0) Udev cookie 0xd4d54d7 (semid 393216) assigned to CREATE task(0) with flags DISABLE_SUBSYSTEM_RULES DISABLE_DISK_RULES DISABLE_OTHER_RULES (0xe) DEBU[0000] libdevmapper(7): ioctl/libdm-iface.c:1724 (0) dm create convoy-pool OF 16384 ERRO[0000] libdevmapper(3): ioctl/libdm-iface.c:1742 (-1) device-mapper: create ioctl on convoy-pool failed: Device or resource busy DEBU[0000] libdevmapper(7): ioctl/libdm-iface.c:1302 (0) DEBU[0000] libdevmapper(7): libdm-common.c:2032 (0) Udev cookie 0xd4d54d7 (semid 393216) decremented to 1 DEBU[0000] libdevmapper(7): libdm-common.c:2032 (0) Udev cookie 0xd4d54d7 (semid 393216) decremented to 0 DEBU[0000] libdevmapper(7): libdm-common.c:2288 (0) Udev cookie 0xd4d54d7 (semid 393216) waiting for zero DEBU[0000] libdevmapper(7): libdm-common.c:2047 (0) Udev cookie 0xd4d54d7 (semid 393216) destroyed DEBU[0000] Cleaning up environment... pkg=daemon ERRO[0000] Error running DeviceCreate (CreatePool) dm_task_run failed { "Error": "Error running DeviceCreate (CreatePool) dm_task_run failed" } root@ip-172-31-26-7:/home/ubuntu/shashank/src/github.com/rancher/convoy# ^C root@ip-172-31-26-7:/home/ubuntu/shashank/src/github.com/rancher/convoy# clear root@ip-172-31-26-7:/home/ubuntu/shashank/src/github.com/rancher/convoy# clear root@ip-172-31-26-7:/home/ubuntu/shashank/src/github.com/rancher/convoy# bin/convoy daemon --drivers devicemapper --driver-opts dm.datadev=/dev/loop2 --driver-opts dm.metadatadev=/dev/loop3 DEBU[0000] Creating config at /var/lib/rancher/convoy pkg=daemon DEBU[0000] driver=devicemapper driver_opts=map[dm.datadev:/dev/loop2 dm.metadatadev:/dev/loop3] event=init pkg=daemon reason=prepare root=/var/lib/rancher/convoy DEBU[0000] libdevmapper(7): ioctl/libdm-iface.c:1724 (0) dm version OF 16384 DEBU[0000] libdevmapper(7): libdm-common.c:2105 (0) Udev cookie 0xd4da1df (semid 425984) created DEBU[0000] libdevmapper(7): libdm-common.c:2125 (0) Udev cookie 0xd4da1df (semid 425984) incremented to 1 DEBU[0000] libdevmapper(7): libdm-common.c:1997 (0) Udev cookie 0xd4da1df (semid 425984) incremented to 2 DEBU[0000] libdevmapper(7): libdm-common.c:2238 (0) Udev cookie 0xd4da1df (semid 425984) assigned to CREATE task(0) with flags DISABLE_SUBSYSTEM_RULES DISABLE_DISK_RULES DISABLE_OTHER_RULES (0xe) DEBU[0000] libdevmapper(7): ioctl/libdm-iface.c:1724 (0) dm create convoy-pool OF 16384 ERRO[0000] libdevmapper(3): ioctl/libdm-iface.c:1742 (-1) device-mapper: create ioctl on convoy-pool failed: Device or resource busy DEBU[0000] libdevmapper(7): ioctl/libdm-iface.c:1302 (0) DEBU[0000] libdevmapper(7): libdm-common.c:2032 (0) Udev cookie 0xd4da1df (semid 425984) decremented to 1 DEBU[0000] libdevmapper(7): libdm-common.c:2032 (0) Udev cookie 0xd4da1df (semid 425984) decremented to 0 DEBU[0000] libdevmapper(7): libdm-common.c:2288 (0) Udev cookie 0xd4da1df (semid 425984) waiting for zero DEBU[0000] libdevmapper(7): libdm-common.c:2047 (0) Udev cookie 0xd4da1df (semid 425984) destroyed DEBU[0000] Cleaning up environment... pkg=daemon ERRO[0000] Error running DeviceCreate (CreatePool) dm_task_run failed { "Error": "Error running DeviceCreate (CreatePool) dm_task_run failed" }

shashankmjain commented 8 years ago

Adding complete log here

DEBU[0000] Found existing config. Ignoring command line opts, loading config from /var/lib/convoy pkg=daemon DEBU[0000] driver=devicemapper driver_opts=map[dm.metadatadev:/dev/loop3 dm.datadev:/dev/loop2] event=init pkg=daemon reason=prepare root=/var/lib/convoy DEBU[0000] Found created pool, skip pool reinit pkg=devmapper DEBU[0000] driver=devicemapper event=init pkg=daemon reason=complete DEBU[0000] Registering POST, /volumes/umount pkg=daemon DEBU[0000] Registering POST, /snapshots/create pkg=daemon DEBU[0000] Registering POST, /backups/create pkg=daemon DEBU[0000] Registering POST, /volumes/create pkg=daemon DEBU[0000] Registering POST, /volumes/mount pkg=daemon DEBU[0000] Registering DELETE, /snapshots/ pkg=daemon DEBU[0000] Registering DELETE, /backups pkg=daemon DEBU[0000] Registering DELETE, /volumes/ pkg=daemon DEBU[0000] Registering GET, /volumes/ pkg=daemon DEBU[0000] Registering GET, /snapshots/ pkg=daemon DEBU[0000] Registering GET, /backups/list pkg=daemon DEBU[0000] Registering GET, /backups/inspect pkg=daemon DEBU[0000] Registering GET, /info pkg=daemon DEBU[0000] Registering GET, /uuid pkg=daemon DEBU[0000] Registering GET, /volumes/list pkg=daemon DEBU[0000] Registering plugin handler POST, /VolumeDriver.Mount pkg=daemon DEBU[0000] Registering plugin handler POST, /VolumeDriver.Unmount pkg=daemon DEBU[0000] Registering plugin handler POST, /VolumeDriver.Path pkg=daemon DEBU[0000] Registering plugin handler POST, /Plugin.Activate pkg=daemon DEBU[0000] Registering plugin handler POST, /VolumeDriver.Create pkg=daemon DEBU[0000] Registering plugin handler POST, /VolumeDriver.Remove pkg=daemon ^CCaught signal interrupt: shutting down. DEBU[0034] Cleaning up environment... pkg=daemon ERRO[0034] http server erroraccept unix /var/run/convoy/convoy.sock: use of closed network connection pkg=daemon root@ip-172-31-26-7:/home/ubuntu/shashank/src/github.com/rancher/convoy# bin/convoy daemon --drivers devicemapper --driver-opts dm.datadev=/dev/loop2 --driver-opts dm.metadatadev=/dev/loop3 DEBU[0000] Creating config at /var/lib/rancher/convoy pkg=daemon DEBU[0000] driver=devicemapper driver_opts=map[dm.datadev:/dev/loop2 dm.metadatadev:/dev/loop3] event=init pkg=daemon reason=prepare root=/var/lib/rancher/convoy DEBU[0000] libdevmapper(7): ioctl/libdm-iface.c:1724 (0) dm version OF 16384 DEBU[0000] libdevmapper(7): libdm-common.c:2105 (0) Udev cookie 0xd4d059e (semid 524288) created DEBU[0000] libdevmapper(7): libdm-common.c:2125 (0) Udev cookie 0xd4d059e (semid 524288) incremented to 1 DEBU[0000] libdevmapper(7): libdm-common.c:1997 (0) Udev cookie 0xd4d059e (semid 524288) incremented to 2 DEBU[0000] libdevmapper(7): libdm-common.c:2238 (0) Udev cookie 0xd4d059e (semid 524288) assigned to CREATE task(0) with flags DISABLE_SUBSYSTEM_RULES DISABLE_DISK_RULES DISABLE_OTHER_RULES (0xe) DEBU[0000] libdevmapper(7): ioctl/libdm-iface.c:1724 (0) dm create convoy-pool OF 16384 ERRO[0000] libdevmapper(3): ioctl/libdm-iface.c:1742 (-1) device-mapper: create ioctl on convoy-pool failed: Device or resource busy DEBU[0000] libdevmapper(7): ioctl/libdm-iface.c:1302 (0) DEBU[0000] libdevmapper(7): libdm-common.c:2032 (0) Udev cookie 0xd4d059e (semid 524288) decremented to 1 DEBU[0000] libdevmapper(7): libdm-common.c:2032 (0) Udev cookie 0xd4d059e (semid 524288) decremented to 0 DEBU[0000] libdevmapper(7): libdm-common.c:2288 (0) Udev cookie 0xd4d059e (semid 524288) waiting for zero DEBU[0000] libdevmapper(7): libdm-common.c:2047 (0) Udev cookie 0xd4d059e (semid 524288) destroyed DEBU[0000] Cleaning up environment... pkg=daemon ERRO[0000] Error running DeviceCreate (CreatePool) dm_task_run failed { "Error": "Error running DeviceCreate (CreatePool) dm_task_run failed" }

shashankmjain commented 8 years ago

Issue seems to be while creating pool. It says device/resource is busy

shashankmjain commented 8 years ago

This works fine after deletion of block devices and recreation