Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix persistent folder check within containers #2631

Merged

Conversation

BlackDex
Copy link
Collaborator

The previous persistent folder check worked by checking if a file
exists. If you used a bind-mount, then this file is not there. But when
using a docker/podman volume those files are copied, and caused the
container to not start.

This change checks the /proc/self/mountinfo for a specific patern to
see if the data folder is persistent or not.

Fixes #2622

src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
The previous persistent folder check worked by checking if a file
exists. If you used a bind-mount, then this file is not there. But when
using a docker/podman volume those files are copied, and caused the
container to not start.

This change checks the `/proc/self/mountinfo` for a specific patern to
see if the data folder is persistent or not.

Fixes dani-garcia#2622
@BlackDex BlackDex force-pushed the fix-2622-persistent-volume-check branch from 9b5f96e to 9a787dd Compare July 20, 2022 11:30
@dani-garcia dani-garcia merged commit 1385d75 into dani-garcia:main Jul 22, 2022
@BlackDex BlackDex deleted the fix-2622-persistent-volume-check branch July 22, 2022 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker container v1.25.1 persistent check with volumes fails to start
4 participants