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

Container Boot Faild - logs : VolumeDriver.Mount: exit status 1%!(EXTRA []interface {}=[]) #7

Open
Loongel opened this issue Jun 15, 2020 · 5 comments
Labels

Comments

@Loongel
Copy link

Loongel commented Jun 15, 2020

docker container boof faild caused by docker-volume-davfs bug, there are the logs:

Failure error while mounting volume Failure error while mounting volume '/var/lib/docker/plugins/66235d61a6c4b16d936c6c2369e343665e65b90fc83cabc9770c3525483c5632/rootfs': VolumeDriver.Mount: exit status 1%!(EXTRA []interface {}=[])

I got this problem after I rebooted my vps. To reproduce the bug, I've tried several times on different vps. It reproduced randomly.

To figure out this bug I attached inside of the plugin rootfs sh by "Debugging plugins"

I read the main.go and simulated the action of mount function by shell

mount.davfs http://x.x.x.x:xx/xx /mnt/volumes/223bce26d5145548e9980f5738087c80 -o uid=1000 -o gid=1000

and got those msg:

found PID file /var/run/mount.davfs/mnt-volumes-223bce26d5145548e9980f5738087c80.pid.
Either /mnt/volumes/223bce26d5145548e9980f5738087c80 is used by another process,
or another mount process ended irregular

As so far, the bug is clear. And there're two enhanced features can be discussed:

  1. The different (name) webdav volumes with the same url cannot be support by now due to the same davfs pid name confliction . Could we do some works to support?
  2. The davfs pid file conflicted probabilistically after the physical machines of docker rebooted .

Thanks for your great jobs !

@fentas
Copy link
Owner

fentas commented Jun 24, 2020

nice job 👍
Hm do you think pid consists from the davfs url? I would say it reflects the docker volume id, so a problem could be a multi mount of the same volume (would guess volumes - pids - are also mounted for stopped container ~ would explain that it consists after reboot).

We have to look into this. 👀

@fentas fentas added the bug label Jun 24, 2020
@Loongel
Copy link
Author

Loongel commented Jun 24, 2020

I thought this project is no longer maintained, so I forked and modified the code a few hours before. ^_^
The major changes :
line:324
cmd_full := exec.Command(fmt.Sprintf("kill -0 $(cat %s) > /dev/null 2>&1;if [ $? -ne 0 ];then rm %s -f && %s;fi", pidFile, pidFile, mountCmd))
https://github.com/Loongel/docker-volume-davfs/blob/master/main.go

@fentas
Copy link
Owner

fentas commented Jun 27, 2020

Just sideproject. : )
Hm you just kill pid (webdav mount) mounted or not and then remount.
Maybe better way would be to check if mounted and if so just let it be or mount if it is not there?

@Loongel
Copy link
Author

Loongel commented Jun 28, 2020

Yes. The code kill -0 is a simple and crude method for checking mounted.

@pstorch
Copy link

pstorch commented Mar 31, 2021

I've got hit by this error after a system upgrade and a necessary reboot.
Now it is not possible anymore to have two docker volumes with the same webdav server, but two different subdirectories, to be used by one container.
How do I solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants