wetopi / docker-volume-rbd

Docker Engine managed plugin to manage RBD volumes.
MIT License
69 stars 18 forks source link

Setting "RBD_CONF_POOL" not found in the plugin configuration #3

Closed seffyroff closed 6 years ago

seffyroff commented 6 years ago

upon installation with the following arguments:

docker plugin install wetopi/rbd \
  --alias=wetopi/rbd \
  LOG_LEVEL=1 \
  RBD_CONF_POOL="rbd" \
  RBD_CONF_CLUSTER=ceph \
  RBD_CONF_KEYRING_USER=client.docker

I get the following output:

seffyroff@celery:/var/data$ docker plugin install wetopi/rbd \
>   --alias=wetopi/rbd \
>   LOG_LEVEL=1 \
>   RBD_CONF_POOL="rbd" \
>   RBD_CONF_CLUSTER=ceph \
>   RBD_CONF_KEYRING_USER=client.docker
Plugin "wetopi/rbd" is requesting the following privileges:
 - network: [host]
 - mount: [/lib/modules]
 - mount: [/dev]
 - mount: [/etc/ceph]
 - mount: [/sys]
 - allow-all-devices: [true]
 - capabilities: [CAP_SYS_ADMIN CAP_SYS_MODULE]
Do you grant the above permissions? [y/N] y
latest: Pulling from wetopi/rbd
59f3fc91e4b5: Downloading [==================================59f3fc91e4b5: Download complete 
Digest: sha256:716ad0c123d17294903fbb43376d30372f7675ed437dd2bea402e0cb3fb72661
Status: Downloaded newer image for wetopi/rbd:latest
Error response from daemon: setting "RBD_CONF_POOL" not found in the plugin configuration

Running Docker 18.05.0-ce on Ubuntu Bionic x64.

seffyroff commented 6 years ago

The plugin installs successfully if I remove the RBD_CONF_POOL env, but if I then try to create a volume, predictably if fails with:

seffyroff@celery:/var/data$ docker volume create -d wetopi/rbd -o size=206 my_rbd_volume
Error response from daemon: create my_rbd_volume: VolumeDriver.Create: volume-rbd Name=my_rbd_volume Request=Create Message=pool option required
seffyroff commented 6 years ago

Adding -o pool=rbd allows me to successfully create an image:

seffyroff@celery:/var/data$ docker volume create -d wetopi/rbd -o size=206 my_rbd_volume -o pool="rbd"
my_rbd_volume
seffyroff@celery:/var/data$ docker volume ls
DRIVER              VOLUME NAME
wetopi/rbd:latest   my_rbd_volume

I see in your changelog:

Rbd pool: is a plugin config param. (changed in order to avoid the need to persist state of volumes).

Perhaps version 1.0 didn't get uploaded to the docker hub?

seffyroff commented 6 years ago

Continuing on, attempting to deploy from a compose file like this:

volumes:
  data:
    driver: wetopi/rbd
    driver_opts:
      size: 256M
      pool: rbd

Errors out like this. Looks like it's trying to talk to a Consul KV store?

create container_data: VolumeDriver.Create: volume-rbd Name=container_data Request=Create Message=unable to save volume state: Put http://127.0.0.1:8500/v1/kv/docker/volume/rbd/container_data: dial tcp 127.0.0.1:8500: getsockopt: connection refused

sitamet commented 6 years ago

Problem is you are not running the latest plugin version (our fault. makefile was pushing only with version tag)

You can check the version with a:

docker plugin inspect wetopi/rbd:latest | grep PLUGIN_VERSION

Solution:

docker plugin install wetopi/rbd:1.0.1 ... .. .