Skip to content

Add support to specify cluster_partition_handling through ENV vars #185

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
wants to merge 3 commits into from

Conversation

boeboe
Copy link

@boeboe boeboe commented Sep 12, 2017

Used in a Kubernetes context, it is very convenient to be able to specify the cluster partition handling as documented at https://www.rabbitmq.com/partitions.html

Using the RABBITMQ_CLUSTER_PARTITION_HANDLING environment value is a flexible solution.

@tianon
Copy link
Member

tianon commented Sep 18, 2017

See docker-library/docs#1011.

@vovandodev
Copy link

I've added this lines to my docker-entrypoint.sh
Also added export RABBITMQ_CLUSTER_PARTITION_HANDLING="pause_minority" into container. But it's not working. It's very important for me to test pause minority now. But due to automatic recreating of the config file, I can't do that. What should I adjust to be able to run it? :) Thanks.

@yosifkit
Copy link
Member

@noteits, I would assume that these changes would work, but I have never used them. We try to keep what the entrypoint uses to a minimal set, which is why this PR is not merged.

One suggestion is using RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS. Or if you are using rabbitmq:3.7, you can use the newer config format: https://www.rabbitmq.com/configure.html#config-file and the file will not be completely overwritten when you provide any of the env vars. So you can provide a base config built into your image with values that are not supported by the entrypoint and then customize it on deployment with the environment variables.

@vovandodev
Copy link

vovandodev commented Apr 18, 2018

Thanks for your explanations, but unfortunately I am using 3.6.14.
I've added this changes to the docker-entrypoint.sh in container and restarted it.
sed -i "68i cluster_partition_handling" docker-entrypoint.sh
sed -i /'verify|fail_if_no_peer_cert|depth)'/d docker-entrypoint.sh
sed -i "217i verify|fail_if_no_peer_cert|depth|cluster_partition_handling)" docker-entrypoint.sh
Also
echo $RABBITMQ_CLUSTER_PARTITION_HANDLING
pause_minority

But it's not working. Is any other solution how to add pause_minority to config file? :(

@yosifkit
Copy link
Member

with 3.7's simpler config format, we'd rather move to doing less config via the entrypoint

- #202 (comment)

@yosifkit yosifkit closed this Jan 17, 2019
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

Successfully merging this pull request may close these issues.

4 participants