Skip to content
Snippets Groups Projects
Unverified Commit 321447fc authored by Göran Pöhner's avatar Göran Pöhner Committed by GitHub
Browse files

Allow force_boot option during redeployment of RabbitMQ (#1087)

parent 5c6e772d
No related branches found
No related tags found
No related merge requests found
# RabbitMQ
![Version: 0.5.4](https://img.shields.io/badge/Version-0.5.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.10.5](https://img.shields.io/badge/AppVersion-3.10.5-informational?style=flat-square)
![Version: 0.5.5](https://img.shields.io/badge/Version-0.5.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.10.5](https://img.shields.io/badge/AppVersion-3.10.5-informational?style=flat-square)
## Changelog
......@@ -153,6 +153,7 @@ Section to define custom services
| authentication.password | string | `"guest"` | Initial password |
| authentication.erlangCookie | string | `nil` | Erlang cookie (MANDATORY) (Alternative: Set the environment variable ERLANG_COOKIE) |
| clustering.rebalance | bool | `false` | Enable rebalance queues with master when new replica is created |
| clustering.forceBoot | bool | `false` | Force boot in case cluster peers are not available |
| clustering.useLongName | bool | `true` | Use FQDN for RabbitMQ node names |
## RabbitMQ memory parameters
......
......@@ -29,4 +29,5 @@
| 0.5.2 | 3.10.2 | Upgraded to RabbitMQ 3.10.2 |
| 0.5.3 | 3.10.4 | Upgraded to RabbitMQ 3.10.4 |
| 0.5.4 | 3.10.5 | Upgraded to RabbitMQ 3.10.5 |
| 0.5.5 | 3.10.5 | Added force_boot option during cluster redeployment |
| | | |
......@@ -34,12 +34,18 @@ data:
chmod 600 /var/lib/rabbitmq/.erlang.cookie
echo "Finished."
startup.sh: |
{{- if .Values.clustering.forceBoot }}
echo "Forcing boot of cluster instance" >/proc/1/fd/1
rabbitmqctl force_boot
{{- end }}
{{- if .Values.clustering.rebalance }}
until rabbitmqctl cluster_status >/dev/null; do
echo "PostStart: Waiting for cluster readiness..." >/proc/1/fd/1
sleep 5
done
echo "PostStart: Rebalancing all queues.." >/proc/1/fd/1
rabbitmq-queues rebalance "all" >/proc/1/fd/1
{{- end }}
shutdown.sh: |
{{- if and (.Values.terminationGracePeriodSeconds) (gt (int .Values.terminationGracePeriodSeconds) 10) }}
if rabbitmqctl cluster_status; then
......
......@@ -174,7 +174,7 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
lifecycle:
{{- if and .Values.clustering.rebalance (gt (.Values.replicaCount | int) 1) }}
{{- if gt (.Values.replicaCount | int) 1 }}
postStart:
exec:
command:
......
......@@ -330,6 +330,8 @@ extraSecretAdvancedConfigs:
clustering:
## Rebalance queues with master when new replica is created
rebalance: false
## Force boot in case cluster peers are not available
forceBoot: false
## Use FQDN for RabbitMQ node names
useLongName: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment