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

Restarting server with docker-compose may crash with "Are you trying to mount a directory onto a file (or vice-versa)?" #48

Open
Rikuoja opened this issue Jan 24, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Rikuoja
Copy link
Collaborator

Rikuoja commented Jan 24, 2022

Describe the bug
In some cases, restarting serve with docker-compose when services have been started in the wrong order may fail with

ERROR: for swag  Cannot start service serve: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/tmp/flask/uwsgi.sock" to rootfs at "/tmp/flask/uwsgi.sock" caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

To Reproduce
Will be caused at least by /tmp/flask/uwsgi.sock being directory instead of socket. This may be caused by starting the services in the wrong order, so mounting has created it, instead of flask, as it should. Also may be caused by stale/old volumes available to swag image?

Additional context
Related to docker-compose issue docker-archive/compose-cli#1795

May be fixed by

  1. rmdir /tmp/flask/uwsgi.sock, so flask will recreate it as socket, and
  2. deleting swag volumes with docker-compose rm -v serve
@Rikuoja Rikuoja added the bug Something isn't working label Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant