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

Swarm Service bind mounts not working unless manually created #1187

Open
fiechtor opened this issue Jan 23, 2025 · 0 comments
Open

Swarm Service bind mounts not working unless manually created #1187

fiechtor opened this issue Jan 23, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@fiechtor
Copy link

fiechtor commented Jan 23, 2025

To Reproduce

  1. Create a cluster with at least 1 worker node
  2. Create any application
  3. Force placement on worker node
  4. Create bind mount to an absolute path
  5. Deploy application

Current vs. Expected behavior

Current behaviour:
The service endlessly tries to start up, never succeeds. The following error message is displayed:

invalid mount config for type "bind": bind source path does not exist: /<parent-dir>/<mount-path>

Even when <parent-dir> has chmod 777, the mount is not created.

Expected behaviour:
The directory tree up until the mount directory is created on either saving the bind mount config, or on deployment.
Might even benefit from notifying the user with a 'directory does not exist' dialog, with options to create the directory.

Provide environment information

OS: Ubuntu 22.04
VPS Provider: DigitalOcean

Which area(s) are affected? (Select all that apply)

Application, Docker Compose, Docker

Are you deploying the applications where Dokploy is installed or on a remote server?

Both

Additional context

Just as some extra info:
I use a glusterfs setup, sharing files on the same path over all of my swarms nodes in disperse mode. Bind mount are thus shared, and can be statically defined. This works great by the way, but the system won't create the mounts for me.

Will you send a PR to fix it?

Yes

@fiechtor fiechtor added the bug Something isn't working label Jan 23, 2025
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