Skip to content

Competition on the service object caused by naming conflicts #1464

@AnSmith22

Description

@AnSmith22

Describe the bug

Given a rabbitmq cluster instance named foo, the rabbitmq operator creates a headless service named foo-nodes and a client (cluster ip) service named foo. This naming mechanism can caused potential competition between multiple rabbitmq cluster instances.

Concretely, suppose that there is another rabbimq cluster instance named foo-nodes, and its client service will be named foo-nodes as well, and then the competition starts: when reconciling for foo, the controller will create/update foo-nodes as a headless service; when reconciling for foo-nodes, the controller will create/update foo-nodes as a client service. In fact, only one rabbitmq cluster instance will actually win because the service object can have only one controller owner reference (pointing to only one rabbitmq cluster instance), and the other one is desitined to never get its service object ready.

To Reproduce

Steps to reproduce the behavior:

  1. Create a rabbitmq cluster instance called foo
  2. Create a second one called foo-nodes

One can switch the order of the above steps and will observe symmetric behavior.

Expected behavior
The rabbitmq operator should never cause any naming conflicts for any rabbitmq cluster instances it manages.

Version and environment information

  • RabbitMQ Cluster Operator: 008f7c7

Additional context

A potential solution is to change the way it names the client service. For example, if the client service is named as foo-client, such naming conflicts will never happen (between rabbitmq cluster instances).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions