Mountpoint is not empty if docker containers were not quit
If colima is stopped while docker containers are running (e.g. colima stop or computer restart), mounting directories on the next start fails:
> msg="[hostagent] Mounting \"/Users/…/Library/Caches/colima\""
> msg="[hostagent] Mounting \"/Users/…/src\""
> msg="[hostagent] fuse: mountpoint is not empty"
> msg="[hostagent] fuse: if you are sure this is safe, use the 'nonempty' mount option"
When connecting to the instance via SSH an empty directory structure representing the docker mount points is found. After shutting down all running docker containers, stopping and starting colima the mount point works again.
Reproduce:
colima start --mount ~/src:wcd ~/src/foo/bar/prj/ && docker-compose upwith volumes, e.g.volumes: - ./data/db:/var/lib/mysql:rwcolima stop && colima start- See message
fuse: mountpoint is not empty docker-compose downcolima ssh, delete empty directory structure…/src/foo/bar/prj/data/db(viasudo rm …)colima stop && colima start, mount works again
Looks like something is started before the files are mounted?
@jjeising I am struggling to reproduce this. Can you kindly verify your version of colima and lima?
colima version
lima --version
Sure:
colima version 0.3.2
git commit: 272db4732b90390232ed9bdba955877f46a50552
limactl version 0.8.2
This is still reproducible.
Is this maybe a permission issue? The first folder inside the vm belongs to lima, but the subfolders belong to root.
@jjeising We ran into the same issue over in https://github.com/lima-vm/lima/issues/584 if you want to join the conversation. We have some workarounds but no clean fix yet. To reproduce you need a docker container that has a restart policy, we're running into it with always but I think it also happens with the other restart policies.
Delaying Docker daemon startup until boot is complete may fix this.
To reproduce you need a docker container that has a restart policy
Yes, the containers all have restart: unless-stopped.
This would also be the expected behaviour, similar to Docker Desktop: if the containers where once startet (with a policy) they are always running if Colima is running.