anybox / buttervolume

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

Make driver volume plugin complaiant with v1.13 #17

Closed petrus-v closed 6 years ago

petrus-v commented 6 years ago

We have to make this plugin complaint with v1.12

https://docs.docker.com/engine/extend/plugins_volume/#command-line-changes

Seen in docker daemon logs: Mar 23 03:53:38 nepri env[959]: time="2018-03-23T03:53:38.297181357Z" level=warning msg="Volume driver btrfs returned an error while trying to query its capabilities, using default capabilities: VolumeDriver.Cap Mar 23 03:53:38 nepri env[959]: <!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\"> Mar 23 03:53:38 nepri env[959]: Mar 23 03:53:38 nepri env[959]: Mar 23 03:53:38 nepri env[959]: Error: 404 Not Found Mar 23 03:53:38 nepri env[959]: <style type=\"text/css\"> Mar 23 03:53:38 nepri env[959]: html {background-color: #eee; font-family: sans;} Mar 23 03:53:38 nepri env[959]: body {background-color: #fff; border: 1px solid #ddd; Mar 23 03:53:38 nepri env[959]: padding: 15px; margin: 15px;} Mar 23 03:53:38 nepri env[959]: pre {background-color: #eee; border: 1px solid #ddd; padding: 5px;} Mar 23 03:53:38 nepri env[959]: Mar 23 03:53:38 nepri env[959]: Mar 23 03:53:38 nepri env[959]: Mar 23 03:53:38 nepri env[959]:

Error: 404 Not Found

Mar 23 03:53:38 nepri env[959]:

Sorry, the requested URL 'http://unix:/run/docker/plugins/btrfs.sock/VolumeDriver.Capabilities&#039; Mar 23 03:53:38 nepri env[959]: caused an error:

Mar 23 03:53:38 nepri env[959]:
Not found: '/VolumeDriver.Capabilities'
Mar 23 03:53:38 nepri env[959]: Mar 23 03:53:38 nepri env[959]:

$ docker info Containers: 17 Running: 13 Paused: 0 Stopped: 4 Images: 428 Server Version: 17.09.1-ce Storage Driver: overlay Backing Filesystem: extfs Supports d_type: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: btrfs local Network: bridge host macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0 runc version: 3f2f8b84a77f73d38244dd690525642a72156c64 init version: v0.13.2 (expected: 949e6facb77383876aeff8a6944dde66b3089574) Security Options: seccomp Profile: default selinux Kernel Version: 4.14.19-coreos Operating System: Container Linux by CoreOS 1632.3.0 (Ladybug) OSType: linux Architecture: x86_64 CPUs: 8 Total Memory: 62.71GiB Name: nepri ID: WHLI:2RVN:SOD5:TUOM:PWUA:WRVT:KHYZ:OQPB:V7SM:GEDG:FN2Q:4YRK Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false

ccomb commented 6 years ago

VolumeDriver.Capabilities has been introduced in v 1.12 but : "The driver is not required to implement Capabilities. If it is not implemented, the default values are used."

It's a good idea to implement it, but I'm not sure yet how to handle the global vs local scope, which is the only capability currently supported.

ccomb commented 6 years ago

I understand this has been added with docker swarm in mind : global volumes are expected to be created in all nodes of the swarm cluster.

ccomb commented 6 years ago

VolumeDriver.Capabilitier is implemented as 'local' in buttervolume 2.0