moby/volume
Paweł Gronowski c35376c455
volume/local: Don't unmount, restore mounted status
On startup all local volumes were unmounted as a cleanup mechanism for
the non-clean exit of the last engine process.

This caused live-restored volumes that used special volume opt mount
flags to be broken. While the refcount was restored, the _data directory
was just unmounted, so all new containers mounting this volume would
just have the access to the empty _data directory instead of the real
volume.

With this patch, the mountpoint isn't unmounted. Instead, if the volume
is already mounted, just mark it as mounted, so the next time Mount is
called only the ref count is incremented, but no second attempt to mount
it is performed.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 2689484402)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-29 19:59:05 +02:00
..
drivers golangci-lint: update to v1.49.0 2022-09-23 23:31:27 +02:00
local volume/local: Don't unmount, restore mounted status 2023-08-29 19:59:05 +02:00
mounts Restore active mount counts on live-restore 2023-06-28 09:45:07 +02:00
service Restore active mount counts on live-restore 2023-06-28 09:45:07 +02:00
testutils linting: gosec: fix or suppress G112, G114 in test code 2022-09-04 15:36:51 +02:00
volume.go Restore active mount counts on live-restore 2023-06-28 09:45:07 +02:00