containers / docker-lvm-plugin

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

Install docker-lvm-plugin config only if it doesn't exist. #50

Closed shishir-a412ed closed 6 years ago

shishir-a412ed commented 6 years ago

Signed-off-by: Shishir Mahajan shishirm@nvidia.com

shishir-a412ed commented 6 years ago

Right now:

1) If a user is running an older version of docker-lvm-plugin with his config file /etc/docker/docker-lvm-plugin configured with volume group name. e.g.

[root@localhost docker]# cat /etc/docker/docker-lvm-plugin 
# Update volume group (vg) name in this file. A volume group name is needed 
# to create logical volumes using docker lvm plugin. You can choose an existing
# volume group name by listing volume groups on your system using `vgs` command 
# OR create a new volume group using `vgcreate` command. 
# e.g. vgcreate volume_group_one /dev/hda where /dev/hda is your partition or
# whole disk on which physical volumes were created.
VOLUME_GROUP=vg1

2) He updates his plugin by doing a make followed by sudo make install His config file will be overwritten by an empty config file.

This PR fixes that, by only installing the config file (/etc/docker/docker-lvm-plugin) if it doesn't exist.

ping @rhatdan

rhatdan commented 6 years ago

LGTM