Skip to content

Rabbitmq vhost and user support#1052

Open
lmiccini wants to merge 2 commits intoopenstack-k8s-operators:mainfrom
lmiccini:rabbitmq_vhosts
Open

Rabbitmq vhost and user support#1052
lmiccini wants to merge 2 commits intoopenstack-k8s-operators:mainfrom
lmiccini:rabbitmq_vhosts

Conversation

@lmiccini
Copy link
Contributor

@lmiccini lmiccini commented Dec 19, 2025

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-22697

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

@softwarefactory-project-zuul
Copy link

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/190f4bb7eca7441d8e42567b23824058

✔️ openstack-meta-content-provider SUCCESS in 3h 29m 35s
✔️ nova-operator-kuttl SUCCESS in 42m 46s
✔️ nova-operator-tempest-multinode SUCCESS in 2h 14m 56s
nova-operator-tempest-multinode-ceph FAILURE in 2h 37m 49s

@lmiccini
Copy link
Contributor Author

recheck

@softwarefactory-project-zuul
Copy link

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/e49f704cb10943c295aeec1583a8186e

✔️ openstack-meta-content-provider SUCCESS in 3h 20m 36s
✔️ nova-operator-kuttl SUCCESS in 45m 29s
✔️ nova-operator-tempest-multinode SUCCESS in 2h 48m 01s
nova-operator-tempest-multinode-ceph FAILURE in 3h 00m 42s

@lmiccini
Copy link
Contributor Author

recheck

@softwarefactory-project-zuul
Copy link

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/nova-operator for 1052,c449b78a627ef1b92bdfbe8b31c7e81728a983d5

cellDatabaseInstance: openstack
cellDatabaseAccount: nova-cell0
hasAPIAccess: true
memcachedInstance: memcached
Copy link
Contributor

Choose a reason for hiding this comment

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

so in this case we expect cell 0 to be using the the rabbitmq rabit cluster
based on teh default of CellMessageBusInstance in the cell template.

// +kubebuilder:validation:Optional
// +kubebuilder:default=rabbitmq
// CellMessageBusInstance is the name of the RabbitMqCluster CR to select
// the Message Bus Service instance used by the nova services to
// communicate in this cell. For cell0 it is unused.
CellMessageBusInstance string `json:"cellMessageBusInstance"`

relying on the implict defaulting is nova very clear.

messagingBus:
cluster: rabbitmq
notificationsBus:
cluster: rabbitmq
Copy link
Contributor

Choose a reason for hiding this comment

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

while this is possibel to do that goes against best practices so this is nto somethin we shoudl supprot downstream

unlike with cells im ok with not blocking this in the webhook since it does not fundementally unermine how cells are desgien to work.

it generally recomemnted upstream for moderate to large clouds that each service uses its own rabbit instnace and notifications are kept sepreate form rpc trafic.

that using seperate notification really shoudl be the only deployment model we supprot downstream but its technially valid so we can supprot it in the operator. in a very small cloud i.e. less then 50 comptues its viable but its not somethign we shoudl ever default too or recommend for most clouds.

@softwarefactory-project-zuul
Copy link

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/ca4ac87ba47c49098e4da429204a102a

✔️ openstack-meta-content-provider SUCCESS in 5h 06m 17s
nova-operator-kuttl FAILURE in 43m 44s
nova-operator-tempest-multinode FAILURE in 25m 44s
✔️ nova-operator-tempest-multinode-ceph SUCCESS in 2h 46m 31s

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 16, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lmiccini
Once this PR has been reviewed and has the lgtm label, please ask for approval from seanmooney. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@lmiccini lmiccini force-pushed the rabbitmq_vhosts branch 2 times, most recently from f5fe07a to d5bf4bf Compare January 16, 2026 07:19
@softwarefactory-project-zuul
Copy link

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/nova-operator for 1052,d5bf4bf5e924abe3eb21fe46e34a7acf5ac27974

@lmiccini
Copy link
Contributor Author

/test functional

@softwarefactory-project-zuul
Copy link

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/61a27248f6d44ffb9c3ef2fb8f54d1c2

✔️ openstack-meta-content-provider SUCCESS in 3h 13m 00s
nova-operator-kuttl FAILURE in 45m 43s
✔️ nova-operator-tempest-multinode SUCCESS in 2h 33m 30s
✔️ nova-operator-tempest-multinode-ceph SUCCESS in 2h 49m 26s

@softwarefactory-project-zuul
Copy link

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/c37d46757ba74c90bc5d68c446753ce7

✔️ openstack-meta-content-provider SUCCESS in 1h 00m 02s
nova-operator-kuttl FAILURE in 42m 10s
nova-operator-tempest-multinode FAILURE in 24m 34s
nova-operator-tempest-multinode-ceph FAILURE in 21m 04s

@softwarefactory-project-zuul
Copy link

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/d6214ce4dde54e78b263373c857bdcbe

openstack-meta-content-provider FAILURE in 6m 50s
⚠️ nova-operator-kuttl SKIPPED Skipped due to failed job openstack-meta-content-provider
⚠️ nova-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-meta-content-provider
⚠️ nova-operator-tempest-multinode-ceph SKIPPED Skipped due to failed job openstack-meta-content-provider

@lmiccini
Copy link
Contributor Author

recheck

@softwarefactory-project-zuul
Copy link

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/17055cd6ff87400794e6a86feee861ac

openstack-meta-content-provider FAILURE in 7m 26s
⚠️ nova-operator-kuttl SKIPPED Skipped due to failed job openstack-meta-content-provider
⚠️ nova-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-meta-content-provider
⚠️ nova-operator-tempest-multinode-ceph SKIPPED Skipped due to failed job openstack-meta-content-provider

@lmiccini
Copy link
Contributor Author

recheck

@softwarefactory-project-zuul
Copy link

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/cef65f09fdcc4908af429ca5f7617228

openstack-meta-content-provider FAILURE in 7m 32s
⚠️ nova-operator-kuttl SKIPPED Skipped due to failed job openstack-meta-content-provider
⚠️ nova-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-meta-content-provider
⚠️ nova-operator-tempest-multinode-ceph SKIPPED Skipped due to failed job openstack-meta-content-provider

@softwarefactory-project-zuul
Copy link

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/e6c3bf90d07b4de2975a530265257caa

openstack-meta-content-provider FAILURE in 7m 31s
⚠️ nova-operator-kuttl SKIPPED Skipped due to failed job openstack-meta-content-provider
⚠️ nova-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-meta-content-provider
⚠️ nova-operator-tempest-multinode-ceph SKIPPED Skipped due to failed job openstack-meta-content-provider

@softwarefactory-project-zuul
Copy link

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/1df0f71b7ce84136bb6cbde9a4157791

openstack-meta-content-provider FAILURE in 10m 42s
⚠️ nova-operator-kuttl SKIPPED Skipped due to failed job openstack-meta-content-provider
⚠️ nova-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-meta-content-provider
⚠️ nova-operator-tempest-multinode-ceph SKIPPED Skipped due to failed job openstack-meta-content-provider

@lmiccini
Copy link
Contributor Author

recheck

if spec.MessagingBus.Cluster == "" {
spec.MessagingBus.Cluster = "rabbitmq"
}

Copy link
Contributor

Choose a reason for hiding this comment

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

should we have validation and default assigment incuded for spec.MessagingBus.user too


general question, so I am not sure why we need to update webhook to set this value here.

I thought webhook is for genral validation of var we set in CR's - like to restrict wrong conf and I generally use webhook to test my live code make run-with-webhook so that to provide pre-requisite
can you tell or @SeanMooney if around !

@softwarefactory-project-zuul
Copy link

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
Contributor Author

lmiccini commented Feb 5, 2026

recheck

@softwarefactory-project-zuul
Copy link

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/493ddad7105949d181ad22f0b1220fef

openstack-meta-content-provider FAILURE in 14m 04s
⚠️ nova-operator-kuttl SKIPPED Skipped due to failed job openstack-meta-content-provider
⚠️ nova-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-meta-content-provider
⚠️ nova-operator-tempest-multinode-ceph SKIPPED Skipped due to failed job openstack-meta-content-provider

@lmiccini
Copy link
Contributor Author

lmiccini commented Feb 5, 2026

recheck

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

Finally, we add the rabbitmquser crs to the secret so they can be
stored for dataplane finalizers management and do auto cleanup of orphaned
users after credential rotations.

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

This change depends on a change that failed to merge.

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

@lmiccini
Copy link
Contributor Author

lmiccini commented Feb 5, 2026

recheck

@lmiccini
Copy link
Contributor Author

lmiccini commented Feb 5, 2026

/test functional

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 5, 2026

@lmiccini: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/precommit-check ebc58fb link true /test precommit-check

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@lmiccini
Copy link
Contributor Author

lmiccini commented Feb 5, 2026

/test functional

@softwarefactory-project-zuul
Copy link

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/be6eb187439e41ce8a142ef3201d3578

✔️ openstack-meta-content-provider SUCCESS in 1h 04m 30s
✔️ nova-operator-kuttl SUCCESS in 46m 20s
nova-operator-tempest-multinode FAILURE in 20m 41s
nova-operator-tempest-multinode-ceph FAILURE in 24m 27s

@lmiccini
Copy link
Contributor Author

lmiccini commented Feb 5, 2026

recheck

1 similar comment
@lmiccini
Copy link
Contributor Author

lmiccini commented Feb 5, 2026

recheck

@softwarefactory-project-zuul
Copy link

This change depends on a change that failed to merge.

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

@lmiccini
Copy link
Contributor Author

lmiccini commented Feb 5, 2026

recheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants