containers / docker-lvm-plugin

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

Fix issue: Auto-mount not working after server crash #53

Closed shishir-a412ed closed 6 years ago

shishir-a412ed commented 6 years ago

Fixes Issue #24

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

shishir-a412ed commented 6 years ago

@rhatdan Please review.

rhatdan commented 6 years ago

Not quite sure what you are doing, but the code LGTM

shishir-a412ed commented 6 years ago

@rhatdan

In case of reboot, systemd unmount the volumes. So during reboot, when the containers exit, they call the unmount path of the plugin and when the plugin tries to unmount the volume it fails (Since the volume is already unmounted by systemd)

With this PR: The plugin will first check if the directory is a mountpoint. If yes, only then it will try to unmount.

shishir-a412ed commented 6 years ago

@rhatdan

More explanation here: https://github.com/projectatomic/docker-lvm-plugin/issues/24#issuecomment-399784514

rhatdan commented 6 years ago

LGTM