anybox / buttervolume

BTRFS Volume plugin for Docker
Apache License 2.0
82 stars 11 forks source link

No Socket /var/run/docker/plugins/btrfs.sock #20

Closed kaotika closed 6 years ago

kaotika commented 6 years ago

Hi, many thanks for the great idea so far. Iam loving btrfs and doing scheduled stuff like snapshotting, syncing, etc. directly with docker is a really great addition.

After installing the plugin like described there is no socket inside /var/run/docker/plugins/. The plugin created a socket at some subpath, e.x. /var/run/docker/plugins/4537bd7d3e863809942031a9f87c54c2f5c38922d4286c1d9ebbcea3d6df4f22/btrfs.sock. I could bring the plugin to work by creating a symbolic link ln -s /4537bd7d3e863809942031a9f87c54c2f5c38922d4286c1d9ebbcea3d6df4f22/btrfs.sock /var/run/docker/plugins/btrfs.sock and manually starting the daemon buttervolume run.

Running buttervolume run printed the following:

Starting scheduler job every 60s
Listening to requests...
Serving on http://unix:/run/docker/plugins/btrfs.sock
INFO:root:New scheduler job at 2018-06-06 12:22:20.475458
petrus-v commented 6 years ago

hum... I thinks the documentation may mixed information from previous version 2.

Once plugins is up:

sudo docker plugin ls
ID                  NAME                         DESCRIPTION                      ENABLED
3ebe8b89b151        anybox/buttervolume:latest   BTRFS Volume Plugin for Docker   true

buttervolume should be already running.

So you can create anybox/buttervolume:latest likes:

sudo docker volume create --name testbtrfs -d anybox/buttervolume:latest
testbtrfs

Then to schedul jobs there is various way, one is to install buttervolume command line client

buttervolume scheduled # this is to list jobs

or using the command line client installed inside the plugin:

alias drunc="sudo docker-runc --root /var/run/docker/plugins/runtime-root/plugins.moby/"
alias buttervolume="drunc exec -t `drunc list|tail -n+2|awk '{print $1}'` buttervolume"
buttervolume --help

I think it's not necessary anymore to have btrfs.sock in /var/run/docker/plugins, (maybe expected for the first use case when installed separetly)

hope that helps, regards

ccomb commented 6 years ago

Hi, I've just released version 3.5 with a more explicit doc about the socket and the difference between running butterbolume as a new-style plugin or running it manually. Closing this issue, you can reopen if you still have some suggestion. Thanks!