镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Binding local folder to worker in cluster #307

Open

Description

@jochendemuth

Using docker-compose.yml to deploy citus cluster. Works great!

Now, in preparation for a larger scale deployment I would like to mount the data directories of the workers to local folders. This would allow me to direct worker data volumes easily to different physical drives/storage.

I started by adding a line into the docker-compose.yml file extending the "volumes:" specification so that it reads:
...
volumes:
- healthcheck-volume:/healthcheck
- /mnt/local:/var/lib/postgresql/data
manager:
...
For a cluster with a single worker node this obviously works like a charm. However, when starting a cluster with two nodes, the second node mounts the identical local folder and both worker nodes read and write onto the same files - disaster happens!

I was hoping to specify a local subfolder named like the worker. Really, just any way to provide distinct folders to every worker. Reading through the docker-compose.yml specification I could not find a way to do so. E.g. I tried various ways to reference a container name or retrieve a runtime enumeration of worker nodes. But to no avail. E.g.
...
volumes:
- healthcheck-volume:/healthcheck
- /mnt/local/{services.worker.container_name}:/var/lib/postgresql/data
manager:
...

I am relatively new to yml in general and docker-compose.yml in particular. Would you know a way to accomplish my goal?

Activity

  1. onurctirtir commented on Jul 29, 2022

    @onurctirtir
    Member

    Gürkan İndibay (@gurkanindibay), do you have some time to have a look into that ?

  2. gurkanindibay commented on Jul 29, 2022

    @gurkanindibay
    Contributor

    Onur Tirtir (@onurctirtir) Thanks for the heads up. However,my plate is full for now. I have urgent issues to fix

  3. rcronin commented on Nov 18, 2022

    @rcronin

    Gürkan İndibay (@gurkanindibay) - Any update on this? Would be a nice feature to be able to do this

  4. gurkanindibay commented on Nov 21, 2022

    @gurkanindibay
    Contributor

    rcronin Thanks for your interest
    still I can not prioritize this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions