Closed redcodex closed 5 years ago
Hi, I had this same problem. Defining the MOUNT_OPTIONS in short syntax eg '-o noatime' does not work. I solved this passing "--options=noatime"
Check that your plugin loaded the new config.json the last push to master fixed this default var MOUNT_OPTIONS:
{
"name": "MOUNT_OPTIONS",
"Description": "Options to pass to the mount command",
"settable": [
"value"
],
"value": "--options=noatime"
}
That fixed it, thanks! Great work on the plugin!
Hi,
I'm trying to use the latest version (2.0.0 it seems) but I'm having trouble with mounting rbd volumes. The creation of a test volume was successful and it is shown with "docker volume ls". But when I try to start a container with "docker run ... -v: --volume-driver=wetopi/rbd ...." I'm getting the following error:
docker: Error response from daemon: VolumeDriver.Mount: volume-rbd Name= Request=Mount Message= unable to mount: exit status 1.
I've enabled debug logging and got the following results (shortened):
So mapping the volume seems to work (got some libceph & rbd output in kernel log) but the mount command doesn't seem to work. The unmount seems to fail since the volume was never mounted (at least man 2 mount says so for EINVAL). I had a look at the source code and logged into the volume container with docker-runc and tried to reproduce all the steps above on the command line:
Since I'm essentially doing the same as the go program I'm a bit puzzled why the manual execution on the command line works and the program does not. I haven't debugged any go programs yet and before I delve into that maybe you have some other things that I could try. Here is some additional info about the system:
Host OS: Debian 9.5 (stretch) Docker Version: Docker version 18.06.1-ce Ceph Version on the cluster nodes: ceph version 12.2.2 Interesting Ceph options in /etc/ceph/ceph.conf: rbd default features = 3
Edit:
Maybe the problem is just a race condition between udev creating the symlink and mounting the path. Even if this doesn't fix my problem I guess it would be a good idea to wait for the availability of the symlink before trying to mount it. Polling every 200ms for 5s or so should be enough. Or even better just use the value returned by the rbd map command, which doesn't rely on udev.