Skip to content

Add some validation to peer discovery #11586

@lukebakken

Description

@lukebakken

Is your feature request related to a problem? Please describe.

In this issue, I thought I had uncovered a bug in inter-node TLS and peer discovery, when in fact I had a simple configuration error in my environment:

https://github.com/lukebakken/docker-rabbitmq-cluster/blob/69791a36b664ed448b970ca0f2ead1742e4822b4/rmq1/rabbitmq.conf#L12-L14

Note that there is a duplicated node, and that node rmq0.local is not in that list. This error was only discovered after @dumbbell carefully looked at debug logs.

Describe the solution you'd like

RabbitMQ should log warnings, or perhaps, even fail to start when an invalid list of nodes is returned by a peer discovery backend:

Ret = Backend:list_nodes(),

In the case of the classic peer discovery backend, @dumbbell suggested that the following are invalid:

  • A list that does not contain the current node.
  • A list with duplicates

@michaelklishin should be able to verify if the above should apply to all backends (k8s, consul, AWS, etc).

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions