linode / docker-volume-linode Goto Github PK
View Code? Open in Web Editor NEWDocker Volume driver for Linode Block Storage
License: Apache License 2.0
Docker Volume driver for Linode Block Storage
License: Apache License 2.0
Right now ext4 is hardcoded. We need to add the ability to specify other filesystems when creating volumes.
docker plugin enable linode/docker-volume-linode
Error response from daemon: dial unix /run/docker/plugins/dbc67ba543ec1cac789bbaaa9ad1b8d33664e95b7345277265e4fc3cc86a011e/linode-driver.sock: connect: no such file or directory
https://github.com/chiefy/linodego/ seeks to become an official Linode APIv4 Go client. It already has some support for volumes, but could use more users and interested developers.
The custom linode/lib.go
API calls could be replaced or simplified by relying on the linodego client.
This client is also being used in https://github.com/displague/docker-machine-linode and https://github.com/displague/terraform-provider-linode .. The additional eyes and support in the API wrapper will benefit all of those projects.
Thanks
</shameless_plug>
Hi
i have the following volume defined:
dv ls
DRIVER VOLUME NAME
linode:latest aanc-staging
When I run the command below i get the error displayed:
docker run --rm -it -v aanc-staging:/mnt busybox touch /mnt/file-to-persist.txt
Unable to find image 'busybox:latest' locally
latest: Pulling from library/busybox
90e01955edcd: Pull complete
Digest: sha256:2a03a6059f21e150ae84b0973863609494aad70f0a80eaeb64bddd8d92465812
Status: Downloaded newer image for busybox:latest
docker: Error response from daemon: error while mounting volume '/mnt/aanc-staging': Post http://%2Frun%2Fdocker%2Fplugins%2F250ad1ac82ee49d84474a5c55e0b2ed241ce379ec66fbbd759cae65d8c20e3ae%2Flinode.sock/VolumeDriver.Mount: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
Thanks
Eric
Create LinodeAPI Mock and add Unit Tests
I use swarm and linode, is there a way to have this driver attaching to multiple linodes in a swarm cluster?
Today I have to keep my data on the manager node, and only use the worker node on applications that dont need volume mounting.
** I have created this issue to track ongoing work **
Currently the docker-volume-linode process has to be downloaded and run in the background manually. An upstart or systemd script is required to keep the process ruining between bounces.
The proposed change is to migrate the current installation to the new Plugin API to alllow installing of the driver with docker:
docker plugin install libgolang/docker-volume-linode
The driver needs to be packaged in a docker image and published.
Volume listing is calling ListInstanceVolumes instead of ListVolumes. Only volumes attached to the current node are listed. Need to change to make the driver work in swarm mode.
Condition to reproduce issue:
Cause:
Fix:
Documentation is wrong. the name of the driver is libgolang/docker-volume-driver and not linode-driver.
The POST /v4/volumes/
endpoint accepts a Linode ID (Config ID is optional and will be inferred similar to how it will be inferred on the /boot
endpoint).
This will prevent provisioning a volume if it would ultimately fail to attach.
The recent 0.14 version fails when installed on CoreOS:
core@lixxx ~ $ docker plugin install --alias linode --grant-all-permissions linode/docker-volume-linode linode-token=...
latest: Pulling from linode/docker-volume-linode
3b1c429d6c02: Download complete
Digest: sha256:466cb47045a480e23b3360df5d72c8e4bb2d73a84fd6a8ab30217822fec50c6f
Status: Downloaded newer image for linode/docker-volume-linode:latest
Error response from daemon: dial unix /run/docker/plugins/b218ceb9e6dc495079cf31235fc541045988f4e85e09515b971b869e14893847/linode.sock: connect: no such file or directory
When migrating my swarm to a different server, I did a docker volume rm
on an important linode volume, thinking this would just remove the docker volume since it was no longer needed on that Linode. Unfortunately, this permanently deleted the actual volume with no warning and no way to recover ๐คฆ.
It would be really nice if this plugin didn't destroy any data. I'm not sure what's possible in a volume driver, but perhaps upon removing a volume, it could also give a warning message to say the physical volume hasn't been deleted?
I'm unable to get a volume created and get the following error
Error response from daemon: create my-test-volume: VolumeDriver.Create: Create(my-test-volume) Failed: [400] Must provide a region or a Linode ID
I followed all the steps of the README including setting the linode-region and linode-label on the plugin.
Any thoughts what I'm doing wrong?
I also tried to specify --opt region=us-southeast
, --opt linode-region=us-southeast
, and --opt linode.region=us-southeast
to the docker volume create command with no luck.
Thanks!
If a volume attached to a host (Host A), then exit the host A container.
Then attached the volume to the other host (host B).
After that, exit the host B container, and try mount that volume on host A, it will return error
"error while mounting volume '': VolumeDriver.Mount: EOF"
After remove the docker dummy volume pointer, the volume can mount to host A again.
docker volume rm [volume name]
it seem related to driver.go line 303 ?
Even the local docker api volume report volume is already exist, the mount function should ensure does it really attached.
driver.go line 303
// else... linode already attached to current host
https://github.com/linode/docker-volume-linode/blob/be8f94b4eb7bd4615e550defa0cf76d98bd23ed6/driver.go
===============
Host A:
docker run -it --rm --mount volume-driver=linode,source=test-vol,destination=/test,volume-opt=size=10 alpine
#(exit container)
Host B:
docker run -it --rm --mount volume-driver=linode,source=test-vol,destination=/test,volume-opt=size=10 alpine
#(exit container)
Host A:
docker run -it --rm --mount volume-driver=linode,source=test-vol,destination=/test,volume-opt=size=10 alpine
return API error (500): error while mounting volume '': VolumeDriver.Mount: EOF
docker volume rm test-vol
Detach
when Unmount
is called. (when the container exits)Use Docker API to find out if volume is in use.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.