Skip to content

[Request] Add support for cluster_partition_handling through ENV var #186

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

Closed
boeboe opened this issue Sep 12, 2017 · 4 comments
Closed

[Request] Add support for cluster_partition_handling through ENV var #186

boeboe opened this issue Sep 12, 2017 · 4 comments

Comments

@boeboe
Copy link

boeboe commented Sep 12, 2017

FYI,

I have added support to configure cluster_partition_handling strategy through the use of an ENV variable. Very handy in container orchestration platforms like Kubernetes.

Pull request: #185

Kindly,
Bart

@foxylion
Copy link

foxylion commented Sep 14, 2017

I second this, we have the same requirements. Did the same modifications. Would be handsome if is already included.

@tianon
Copy link
Member

tianon commented Sep 22, 2017

See also the related docker-library/docs#1011.

@tianon
Copy link
Member

tianon commented Apr 19, 2018

Given docker-library/docs#1011, and that 3.7 introduced the new (trivial to write/append to) ini/sysctl-style configuration format (https://www.rabbitmq.com/configure.html#config-file-formats), I'm going to close this.

In Kubernetes, it should be pretty trivial to create a config object which gets inserted at /etc/rabbitmq/rabbitmq.conf with the desired settings included. 👍

(Or to create a derivative image FROM this one which adds a simple ENTRYPOINT that appends the contents of an environment variable to the above-noted file.)

@sergey-safarov
Copy link

Same result you can mounting /etc/rabbitmq/advanced.config file into container of standard image
Example of advanced.config

[
 {rabbit,
  [%%
   %% cluster_formation.peer_discovery_backend = rabbit_peer_discovery_dns
   %% cluster_formation.dns.hostname = rmq.discovery
   {cluster_formation,
    [
     {peer_discovery_backend, rabbit_peer_discovery_dns},
     {peer_discovery_dns,
      [
       {hostname, "rmq.discovery"}
      ]
     }
    ]
   },

   %% Setting cluster behaviour after split brain
   {cluster_partition_handling, autoheal}
  ]
 }
].

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

4 participants