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
Mesos Persistent Volumes problems #237
Comments
Since we use mostly stateless appsin PaaS, we didn't notice that. Thanks a lot for info. |
sielaq
added a commit
to sielaq/PanteraS
that referenced
this issue
Dec 13, 2016
I made it optional, you will have to do 🤔 I should named it differently like |
just for history |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
The mesos persistent volumes doesnt work eventhough i added in the marathon run params as instructed here https://mesosphere.github.io/marathon/docs/persistent-volumes.html.
The behavior that im seeing is the data either doesnt get persisted in the panteras container or it gets persisted in the panteras container but doesnt get persisted in the host drive.
After investigating this problems for a few days, i found the problem is due to the docker volume propagation are set to rprivate by default when panteras mapped the mesos work dir.
The rprivate propagation in the docker volume meant that a folder cannot be mounted twice. Since panteras itself is a docker container which mounted the /tmp/mesos workdir, therefore the mesos persistent volumes wont work, because it will also mount /tmp/mesos/volumes directory.
To fix this, we need to set the the propagation of the docker volume to 'shared'. This will allow the folder to be mounted twice within docker volume. You wont find this in the official docker documentation yet. As specified here, the documentation is missing moby/moby#20656
To be specific the fix would be to change the docker-compose.yml.tpl
volumes:
- "/etc/resolv.conf:/etc/resolv.conf.orig"
- "/var/spool/marathon/artifacts/store:/var/spool/store"
- "/var/run/docker.sock:/tmp/docker.sock"
- "/var/lib/docker:/var/lib/docker"
- "/sys:/sys"
- "/tmp/mesos:/tmp/mesos:shared"
- "/tmp/supervisord:/tmp/supervisord"
- "/tmp/consul/data:/opt/consul/data"
- "/proc:/host/proc:ro"
- "/sys:/host/sys:ro"
I am happy to create a pull request if you want me to.
The text was updated successfully, but these errors were encountered: