Set cluster name via config

Now that there is a 3.8 alpha build that includes
rabbitmq/rabbitmq-server#2075, let's make use of it!

Without this, when a new cluster was started, some nodes ended up wtih
`rabbit@localhost` for the cluster label, instead of e.g. `rmq-gcp-38`.
The main suspect was a race condition, where the rabbitmq_prometheus app
starts before the cluster name is set via `rabbitmqctl
set_cluster_name`.

[finishes #167835770]
This commit is contained in:
Gerhard Lazu 2019-08-13 15:50:01 +01:00
parent e3c4f62a88
commit b297d7b9eb
7 changed files with 10 additions and 4 deletions

View File

@ -1,6 +1,6 @@
TODAY := $(shell date -u +'%Y.%m.%d')
# Use the latest alpha RabbitMQ 3.8 release - https://dl.bintray.com/rabbitmq/all-dev/rabbitmq-server/
BASED_ON_RABBITMQ_VERSION := 3.8.0-alpha.799
BASED_ON_RABBITMQ_VERSION := 3.8.0-alpha.803
DOCKER_IMAGE_NAME := pivotalrabbitmq/rabbitmq-prometheus
DOCKER_IMAGE_VERSION := $(BASED_ON_RABBITMQ_VERSION)-$(TODAY)
# RABBITMQ_VERSION is used in rabbitmq-components.mk to set PROJECT_VERSION

View File

@ -13,7 +13,7 @@ volumes:
services:
rmq0-dist-tls: &rabbitmq
# https://hub.docker.com/r/pivotalrabbitmq/rabbitmq-prometheus/tags
image: pivotalrabbitmq/rabbitmq-prometheus:3.8.0-alpha.799-2019.08.08
image: pivotalrabbitmq/rabbitmq-prometheus:3.8.0-alpha.803-2019.08.13
networks:
- "rabbitmq-prometheus"
ports:

View File

@ -13,7 +13,7 @@ volumes:
services:
rmq0: &rabbitmq
# https://hub.docker.com/r/pivotalrabbitmq/rabbitmq-prometheus/tags
image: pivotalrabbitmq/rabbitmq-prometheus:3.8.0-alpha.799-2019.08.08
image: pivotalrabbitmq/rabbitmq-prometheus:3.8.0-alpha.803-2019.08.13
networks:
- "rabbitmq-prometheus"
ports:

View File

@ -13,7 +13,7 @@ volumes:
services:
rmq0-qq: &rabbitmq
# https://hub.docker.com/r/pivotalrabbitmq/rabbitmq-prometheus/tags
image: pivotalrabbitmq/rabbitmq-prometheus:3.8.0-alpha.799-2019.08.08
image: pivotalrabbitmq/rabbitmq-prometheus:3.8.0-alpha.803-2019.08.13
networks:
- "rabbitmq-prometheus"
ports:

View File

@ -8,6 +8,8 @@ vm_memory_high_watermark.absolute = 4GiB
vm_memory_high_watermark_paging_ratio = 0.9
disk_free_limit.absolute = 2048MiB
cluster_name = rabbitmq-dist-tls
cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config
cluster_formation.classic_config.nodes.1 = rabbit@rmq0-dist-tls
cluster_formation.classic_config.nodes.2 = rabbit@rmq1-dist-tls

View File

@ -7,6 +7,8 @@ management.listener.ssl = false
vm_memory_high_watermark.absolute = 768MiB
vm_memory_high_watermark_paging_ratio = 0.2
cluster_name = rabbitmq-overview
cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config
cluster_formation.classic_config.nodes.1 = rabbit@rmq0
cluster_formation.classic_config.nodes.2 = rabbit@rmq1

View File

@ -8,6 +8,8 @@ management.listener.ssl = false
# We want the node to have more memory available than 512MB, ideally 3x
vm_memory_high_watermark.absolute = 1536MB
cluster_name = rabbitmq-qq
cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config
cluster_formation.classic_config.nodes.1 = rabbit@rmq0-qq
cluster_formation.classic_config.nodes.2 = rabbit@rmq1-qq