Skip to content

RabbitMQ 3.13.0 nodes with Consul peer discovery enabled fails to form a cluster #10760

Closed
@dumbbell

Description

@dumbbell

The conclusion of the discussion in #10661 is that the Consul peer discovery backend broke in RabbitMQ 3.13.0, following the rewrite of peer discovery in #9797. In this rewrite, the behavior changed significantly. In particular, the lock is only acquired after the discovery phase and only if the node executing peer discovery must join another node.

This breaks the Consul peer discovery backend because the lock also opened a Consul session. Discoverable nodes are those that have a session open.

This was ok in RabbitMQ 3.12.x and before because the steps were:

  1. acquire a lock (which implicitly opens a session in the Consul backend)
  2. discover nodes
  3. join nodes
  4. release the lock

In RabbitMQ 3.13.0, the behavior is:

  1. discover nodes; because nodes may not have opened a session yet, the discovery step can return nothing useful
  2. acquire a lock if the node should join another one; that's where the session is opened but the discovery step above likely returned nothing
  3. join nodes
  4. release the lock

While looking at this, I see that the session is never explicitly closed. Another thing to fix, once I know how to improve peer discovery to allow the Consul backend to open a session early, separate from the locking.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions