yp-engineering / rbd-docker-plugin

Ceph RBD docker volume driver plugin.
MIT License
102 stars 70 forks source link

CLI switch of --rm to destroy volume after stopping container #12

Closed hekaldama closed 8 years ago

hekaldama commented 9 years ago

Add new CLI switch to "--rm" the volume after stopping container. Used namely in testing.

ps-account commented 9 years ago

Thanks! Maybe rm is confusing, make it an option to mount as "non-persistent" instead.

On a similar note, I think I don't really understand this part in the readme file:

Remove - Removes (destroys) RBD Image on request only called for docker run --rm -v ... or docker rm -v ... container controlled by --remove boolean flag (default false) if remove is true -> image is removed if remove is false -> image is renamed with zz prefix for later culling

I tried to run a docker with --rm and mounting a new ceph volume, but after exiting the instance nothing seems to have happened to the newly created ceph volume?

hekaldama commented 9 years ago

Oh. Seems like the plugin itself needs to be configured to allow remove so when starting the volume plugin, do --remove=true to allow for this behavior. Does this help your use case?

porcupie commented 8 years ago

Can this be closed now?