Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not compile plugin with docker 1.10+ - missing Capabilities Volume API method #41

Closed
jianghaitao opened this issue Jun 27, 2016 · 6 comments
Assignees

Comments

@jianghaitao
Copy link

I would like to test out the plugin but it failed to compile as one can see below. Would appreciate any help. Thanks.

# go version
go version go1.6 linux/amd64

# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"

# ceph -v
ceph version 0.94.7 (d56bdf93ced6b80b07397d57e3fa68fe68304432)

# go get github.com/yp-engineering/rbd-docker-plugin
# github.com/yp-engineering/rbd-docker-plugin
../src/github.com/yp-engineering/rbd-docker-plugin/main.go:83: cannot use d (type cephRBDVolumeDriver) as type volume.Driver in argument to volume.NewHandler:
        cephRBDVolumeDriver does not implement volume.Driver (missing Capabilities method)

@porcupie
Copy link
Contributor

Have not seen this error before - but FYI golang 1.6 is not generally supported due to stricter http HOST header checks. Really depends on your docker version and whether docker daemon sending correct HOST header yet.

Also looks like you are using a much newer version of the volume helpers, which has some new Capabilities method on the volume.Driver interface, which we do not yet support.

@de1m
Copy link

de1m commented Jul 19, 2016

I've the same error with go 1.6 on ubuntu 14.04
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=14.04 DISTRIB_CODENAME=trusty DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS"

src/github.com/yp-engineering/rbd-docker-plugin/main.go:83: cannot use d (type cephRBDVolumeDriver) as type volume.Driver in argument to volume.NewHandler: cephRBDVolumeDriver does not implement volume.Driver (missing Capabilities method)

@jiamliang
Copy link

I've the same error with go 1.6 on ubuntu 16.04

github.com/yp-engineering/rbd-docker-plugin

../../../yp-engineering/rbd-docker-plugin/main.go:83: cannot use d (type cephRBDVolumeDriver) as type volume.Driver in argument to volume.NewHandler:
cephRBDVolumeDriver does not implement volume.Driver (missing Capabilities method)

@porcupie
Copy link
Contributor

porcupie commented Aug 3, 2016

We don't (yet) support docker 1.10 nor the new volume-driver plugin "Capabilities" method. Workaround until we add something proper is to downgrade the docker client libraries and docker volume helpers to < docker volume api 1.10.

@porcupie
Copy link
Contributor

porcupie commented Aug 9, 2016

Looks like the Capabilities method was added in docker 1.12.

According to the documentation in the pull request for Capabilities method, we should return the following to indicate that Ceph RBD volumes managed by this plugin are global to the cluster:

{
  "Capabilities": {
    "Scope": "global"
  }
}

@porcupie porcupie reopened this Aug 9, 2016
@porcupie porcupie self-assigned this Aug 9, 2016
@porcupie porcupie changed the title Can not compile plugin on Ubuntu 14.04.3 with Golang 1.6 Can not compile plugin with docker 1.10+ - missing Capabilities Volume API method Aug 9, 2016
@porcupie porcupie added the bug label Aug 9, 2016
porcupie pushed a commit to porcupie/rbd-docker-plugin that referenced this issue Sep 1, 2016
porcupie pushed a commit to porcupie/rbd-docker-plugin that referenced this issue Sep 1, 2016
Update functions to use the new docker volume helpers MountRequest and UnmountRequest in signature.  Still need to implement volume ID tracking.  Partial fix for yp-engineering#41
@porcupie
Copy link
Contributor

Fixed already

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

No branches or pull requests

4 participants