containers / docker-lvm-plugin

Docker volume plugin for LVM volumes
GNU Lesser General Public License v3.0
155 stars 64 forks source link

Support publishing as Docker Engine managed plugin #103

Open kale1d0code opened 2 years ago

kale1d0code commented 2 years ago

I have taken the files from the pull request made by @olljanat that was based on work by @nickbreen found here

To get the plugin to work from within a container I have had to make some changes.

syslog does not run in the context of a container and so the logging library has been replaced from log/syslog to log. I don't know if docker plugins create logs but if they do the docker syslog logging driver could be used to get the original functionality

The plugin requires a config file at /etc/docker/docker-lvm-plugin, This is my first time editing a go project and so I felt it was best to add a volume name to this config file instead of removing the code that checks for it (setting the default volume name should be done by environment variable when running as a managed plugin)

Will allow you close https://github.com/containers/docker-lvm-plugin/issues/66

csoylu commented 2 years ago

Any updates on this? We need an LVM plugin and I couldn't make the main branch work.

kale1d0code commented 1 year ago

Due to personal issues, It will be a while until I can pick this back up.

With these changes the plugin starts up without crashing (as a docker managed plugin), however Something about the volumes being created within a plugin container prevents the volumes being mounted when a container that uses the volume starts. in fact most of the lv commands from the host stop working against logical volumes created within the plugin, lvdisplay shows docker-lvm-plugin related volumes as read-only.

I don't know enough about lvm and am unable to find enough out about it online to finish the work