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

Mountpoint is not empty if docker containers were not quit #138

Open
jjeising opened this issue Jan 21, 2022 · 5 comments
Open

Mountpoint is not empty if docker containers were not quit #138

jjeising opened this issue Jan 21, 2022 · 5 comments

Comments

@jjeising
Copy link

jjeising commented Jan 21, 2022

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:

  1. colima start --mount ~/src:w
  2. cd ~/src/foo/bar/prj/ && docker-compose up with volumes, e.g. volumes: - ./data/db:/var/lib/mysql:rw
  3. colima stop && colima start
  4. See message fuse: mountpoint is not empty
  5. docker-compose down
  6. colima ssh, delete empty directory structure …/src/foo/bar/prj/data/db (via sudo rm …)
  7. colima stop && colima start, mount works again

Looks like something is started before the files are mounted?

@jjeising jjeising changed the title Mountpoint not empty if docker containers where not quit Mountpoint is not empty if docker containers were not quit Jan 24, 2022
@abiosoft
Copy link
Owner

abiosoft commented Feb 9, 2022

@jjeising I am struggling to reproduce this. Can you kindly verify your version of colima and lima?

colima version
lima --version

@jjeising
Copy link
Author

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.

@ngetahun-aclu
Copy link

ngetahun-aclu commented Feb 14, 2022

@jjeising We ran into the same issue over in lima-vm/lima#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.

@abiosoft
Copy link
Owner

Delaying Docker daemon startup until boot is complete may fix this.

@jjeising
Copy link
Author

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.

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

No branches or pull requests

3 participants