Skip to content

Rabbitmq vhost and user support#824

Merged
openshift-merge-bot[bot] merged 5 commits intoopenstack-k8s-operators:mainfrom
lmiccini:rabbitmq_vhosts
Feb 6, 2026
Merged

Rabbitmq vhost and user support#824
openshift-merge-bot[bot] merged 5 commits intoopenstack-k8s-operators:mainfrom
lmiccini:rabbitmq_vhosts

Conversation

@lmiccini
Copy link
Copy Markdown
Contributor

@lmiccini lmiccini commented Dec 22, 2025

Add support for a dedicated rabbitmq cluster for notifications.

Add new messagingBus and notificationsBus interfaces to hold cluster, user and vhost names for optional usage.
The controller adds these values to the TransportURL create request when present.

Additionally, we migrate RabbitMQ cluster name to RabbitMq config struct using DefaultRabbitMqConfig from infra-operator to automatically populate the new Cluster field from legacy RabbitMqClusterName.

Example usage:

spec:
messagingBus:
cluster: rpc-rabbitmq
user: rpc-user
vhost: rpc-vhost
notificationsBus:
cluster: notifications-rabbitmq
user: notifications-user
vhost: notifications-vhost

Jira: https://issues.redhat.com/browse/OSPRH-23909

Depends-on: openstack-k8s-operators/openstack-operator#1797

@lmiccini
Copy link
Copy Markdown
Contributor Author

/test telemetry-operator-build-deploy-kuttl

@lmiccini lmiccini force-pushed the rabbitmq_vhosts branch 3 times, most recently from f3d8a14 to b7891d7 Compare December 24, 2025 07:31
@lmiccini
Copy link
Copy Markdown
Contributor Author

/test telemetry-operator-build-deploy-kuttl

@softwarefactory-project-zuul
Copy link
Copy Markdown

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/openstack-k8s-operators/telemetry-operator for 824,c508071f7c67e908b4c50fd753be35af6e2baea6

@lmiccini lmiccini force-pushed the rabbitmq_vhosts branch 2 times, most recently from 5c776f5 to adbdc4b Compare January 20, 2026 12:43
Comment thread api/v1beta1/ceilometer_webhook.go Outdated
if spec.RabbitMqClusterName == "" {
spec.RabbitMqClusterName = "rabbitmq"
}
rabbitmqv1.DefaultRabbitMqConfig(&spec.MessagingBus, spec.RabbitMqClusterName)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would Ceilometer would need to listen to the Notification rabbitmq? Ceilometer is the consumer of the notifications produced by other services (or itself). If Ceilometer is not subscribed to notifications, no one will consume that, IMHO.

@jlarriba
Copy link
Copy Markdown
Collaborator

Why do we have to have both Notification and Messages RabbitMQs configuration in every service when our services only ever use one RabbitMQ?

Copy link
Copy Markdown
Contributor

@vyzigold vyzigold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a question. I see in the config templates, we have a if / else construct, meaning each service can use only one of the busses at the time. Wouldn't it make sense to have something similar in the controller code? To call transportURLCreateOrUpdate conditionally only for one of the busses, so that there aren't unneeded transporturl CRs.

Another thing we'll need to consider and maybe document related to what Juan noted. If each service can now choose from 2 busses and ceilometer will receive notifications only on one of the bus as well, there won't be any notification metrics available from services using the other bus.

Comment thread internal/autoscaling/const.go Outdated
Comment thread internal/ceilometer/const.go Outdated
Comment thread internal/cloudkitty/const.go Outdated
Comment thread api/v1beta1/autoscaling_webhook.go Outdated
@jlarriba
Copy link
Copy Markdown
Collaborator

Actually, I did a deep dive on Ceilometer, Aodh and CloudKitty code regarding messaging and I have found that both Ceilometer and Aodh only use Notifications, they never send or receive any kind of rpc messages. As highlighted previously, Ceilometer is the only consumer of Notifications in that bus, so it is critical that it is connected to that specific RabbitMQ instance.

Aodh only makes use of Notification bus also, while CloudKitty uses the tcp Messaging Bus and never sends Notifications.

@lmiccini lmiccini force-pushed the rabbitmq_vhosts branch 3 times, most recently from cd36d6f to fe7d760 Compare January 21, 2026 12:35
@lmiccini
Copy link
Copy Markdown
Contributor Author

lmiccini commented Jan 22, 2026

Why do we have to have both Notification and Messages RabbitMQs configuration in every service when our services only ever use one RabbitMQ?

Hey Juan, thanks for having a look. I took at stab at trying to standardize every operator to use the same two interfaces - messagingBus and notificationsBus - for rpc and notifications. Using one or the other (or both) depends on how each service works.
Will review all the other comments and try to address them, please bear with me.

@lmiccini lmiccini force-pushed the rabbitmq_vhosts branch 4 times, most recently from 9012c1a to 94d477f Compare January 26, 2026 11:04
@softwarefactory-project-zuul
Copy link
Copy Markdown

This change depends on a change that failed to merge.

Change openstack-k8s-operators/openstack-operator#1779 is needed.

@softwarefactory-project-zuul
Copy link
Copy Markdown

This change depends on a change that failed to merge.

Change openstack-k8s-operators/openstack-operator#1779 is needed.

@softwarefactory-project-zuul
Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/3ca9f8046bc04f348344d708fb8473f1

openstack-k8s-operators-content-provider FAILURE in 15m 07s
⚠️ telemetry-operator-multinode-cloudkitty SKIPPED Skipped due to failed job telemetry-openstack-meta-content-provider-master
telemetry-openstack-meta-content-provider-master FAILURE in 18m 01s
⚠️ telemetry-operator-multinode-default-telemetry SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ functional-tests-osp18 SKIPPED Skipped due to failed job telemetry-openstack-meta-content-provider-master

@lmiccini
Copy link
Copy Markdown
Contributor Author

recheck

@lmiccini
Copy link
Copy Markdown
Contributor Author

/test telemetry-operator-build-deploy-kuttl

@lmiccini
Copy link
Copy Markdown
Contributor Author

/test telemetry-operator-build-deploy

Comment thread api/v1beta1/cloudkitty_types.go Outdated
@jlarriba
Copy link
Copy Markdown
Collaborator

jlarriba commented Feb 2, 2026

It looks very good now, I made a comment for a field that has been forgotten. Otherwise it lgtm.

The precommit-check complains about adding a new mandatory field: this would break backwards compatibility so it needs to be optional. The other linting errors should be very easy to fix.

@softwarefactory-project-zuul
Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/42e6964c396748af9baea5b0f6285ef5

openstack-k8s-operators-content-provider FAILURE in 12m 05s
⚠️ telemetry-operator-multinode-cloudkitty SKIPPED Skipped due to failed job telemetry-openstack-meta-content-provider-master
telemetry-openstack-meta-content-provider-master FAILURE in 12m 07s
⚠️ telemetry-operator-multinode-default-telemetry SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ functional-tests-osp18 SKIPPED Skipped due to failed job telemetry-openstack-meta-content-provider-master

@lmiccini
Copy link
Copy Markdown
Contributor Author

lmiccini commented Feb 2, 2026

It looks very good now, I made a comment for a field that has been forgotten. Otherwise it lgtm.

The precommit-check complains about adding a new mandatory field: this would break backwards compatibility so it needs to be optional. The other linting errors should be very easy to fix.

Thanks, I should have addressed both the lint and leftover field. I think we should override the crd check (not just for telemetry but for most of the operators), or at least this is our current plan.

@lmiccini
Copy link
Copy Markdown
Contributor Author

lmiccini commented Feb 2, 2026

recheck

@softwarefactory-project-zuul
Copy link
Copy Markdown

This change depends on a change that failed to merge.

Change openstack-k8s-operators/openstack-operator#1779 is needed.

@lmiccini
Copy link
Copy Markdown
Contributor Author

lmiccini commented Feb 2, 2026

recheck

Add support for a dedicated rabbitmq cluster for notifications.

Add new messagingBus and notificationsBus interfaces to hold cluster,
user and vhost names for optional usage.
The controller adds these values to the TransportURL create request when present.

Additionally, we migrate RabbitMQ cluster name to RabbitMq config struct
using DefaultRabbitMqConfig from infra-operator to automatically
populate the new Cluster field from legacy RabbitMqClusterName.

Example usage:

  spec:
    messagingBus:
      cluster: rpc-rabbitmq
      user: rpc-user
      vhost: rpc-vhost
    notificationsBus:
      cluster: notifications-rabbitmq
      user: notifications-user
      vhost: notifications-vhost

Jira: https://issues.redhat.com/browse/OSPRH-23909
@softwarefactory-project-zuul
Copy link
Copy Markdown

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/openstack-k8s-operators/openstack-operator for 1779,d0bba951fd942312b6e33713b2c686fed2fe5bf6

@lmiccini
Copy link
Copy Markdown
Contributor Author

lmiccini commented Feb 5, 2026

recheck

@softwarefactory-project-zuul
Copy link
Copy Markdown

This change depends on a change that failed to merge.

Change openstack-k8s-operators/openstack-operator#1797 is needed.

@lmiccini
Copy link
Copy Markdown
Contributor Author

lmiccini commented Feb 5, 2026

recheck

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Feb 6, 2026

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: lmiccini

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@stuggi
Copy link
Copy Markdown
Contributor

stuggi commented Feb 6, 2026

/override ci/prow/precommit-check

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Feb 6, 2026

@stuggi: Overrode contexts on behalf of stuggi: ci/prow/precommit-check

Details

In response to this:

/override ci/prow/precommit-check

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-merge-bot openshift-merge-bot Bot merged commit fe8dc27 into openstack-k8s-operators:main Feb 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants