qnap-dev / container-apps

Apache License 2.0
80 stars 218 forks source link

"Path is mounted but it is not shared" --> :shared propergationvalue causes issues #61

Closed inject00r closed 5 years ago

inject00r commented 6 years ago

Hi all,

since an update of QNAP or volume change of the hdd I am facing a problem with the :shared setting of docker.

I used for my -v settings :shared to share the content within and between containers.

Now I am stuck with the problem that one docker container is not working anymore. It connects to my google drive and mounts it to the nas. So other containers can also work with it there is a :shared setting in the volume properties.

Everything worked until the update - but now I am only getting this error back:

Error response from daemon: linux mounts: Path /share/Media/cloud-encrypt is mounted on /share/CACHEDEV1_DATA but it is not a shared mount.

In QNAP /share is equal /share/CACHEDEV1_DATA. I don't understand why this is no shared mount, and settings like mount --make-shared also are not available on QNAP.

Without :shared the container itself is working - but not showing content from google drive.

Docker volume settings:


  -v /share/Multimedia/Media/local-media:/local-media:shared \ <- UNION
  -v /share/Multimedia/Media/local-decrypt:/local-decrypt:shared \ -> UNION
  -v /share/Multimedia/Media/cloud-decrypt:/cloud-decrypt:shared \ -> UNION
  -v /share/Multimedia/Media/cloud-encrypt:/cloud-encrypt:shared \

Do you have a idea how I could fix with inside of the shell?

Thanks for your help.

Client: Version: 17.07.0-ce API version: 1.31 Go version:
go1.8.3 Git commit: fd7dc00 Built: Thu Feb 8 15:57:38 2018 OS/Arch: linux/amd64

Server: Version: 17.07.0-ce API version: 1.31 (minimum version 1.12) Go version: go1.8.3 Git commit: fd7dc00 Built: Thu Feb 8 15:57:38 2018 OS/Arch: linux/amd64 Experimental: false 

It seems that it might be a docker bug regarding a default setting of MountFlags=slave when docker is started through systemd.

https://groups.google.com/forum/#!topic/portworx/A2vtTjjzSLI

Question is if you could help, since I also cannot find these config files of docker were I might unset MountFlags = shared

Thanks for your help.

inject00r commented 6 years ago

Here is a problem solution by another product solution: https://docs.portworx.com/knowledgebase/shared-mount-propogation.html

You can check if your docker is affected by running this docker command: docker run -it -v /mnt:/mnt:shared busybox sh -c /bin/date

inject00r commented 6 years ago

push

walkerlee commented 5 years ago

Hi @inject00r,

You can set mount propagation with "busybox mount" command

[~] # busybox mount --make-rshared /
[~] # cat /proc/self/mountinfo