Replies: 3 comments 1 reply
-
Is this a hypothetical problem or did someone actually created a cluster with Changing how we name services would be a breaking change for thousands of users, so I'm against that, especially for a (hypothetical?) corner case. |
Beta Was this translation helpful? Give feedback.
-
Yes, this is a hypotetical scenario that can happen. You can create your own admission controllers using Gatekeeper and write your own policies to prevent such scenario. The cluster operator does not have persistent state, and as such, it must create names in a predictabable manner, so that it can "find" objects it owns after a Pod restart. |
Beta Was this translation helpful? Give feedback.
-
Hi @mkuratczyk @Zerpet thanks for your reply! As you said, it is indeed a corner case problem which happens when the users don't coordinate with each other well in the same namespace. And I would say that the low occurence of the bug does not reduce its severity once it happens :) I totally understand that changing the service name would be a breaking change, and I think it would be very helpful to have some name checks to prevent such corner cases from the beginning.
I will go through the other objects and see if there are other similar potential conflicts. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Given a rabbitmq cluster instance named
foo
, the rabbitmq operator creates a headless service namedfoo-nodes
and a client (cluster ip) service namedfoo
. 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 namedfoo-nodes
as well, and then the competition starts: when reconciling forfoo
, the controller will create/updatefoo-nodes
as a headless service; when reconciling forfoo-nodes
, the controller will create/updatefoo-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:
foo
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
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).Beta Was this translation helpful? Give feedback.
All reactions