Skip to content

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

@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

errors = append(errors, field.Forbidden(
basePath.Child("apiMessageBusInstance"),
"apiMessageBusInstance is deprecated and cannot be changed. Please use messagingBus.cluster instead"))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

so we should allow them to null it out if its set

but we could reject other changes How that is a breaking api change so im not sold on doing that.
it defeats the reason for ahvaing a deprecation period

what woudl be more correct is to not allow setting both at the same time.

i.e you can either use the old field or new filed but not both.

i woudl condier it an error if

cellTemplate.MessagingBus.Cluster and APIMessageBusInstance were ever diffent unless APIMessageBusInstance was nil or ""

we should exicltiy check for an reject that.

}
}

errors = append(errors, spec.ValidateCellTemplates(basePath, namespace)...)
Copy link
Contributor

Choose a reason for hiding this comment

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

so i shoudl point out that

https://github.com/openstack-k8s-operators/nova-operator/blob/main/api/v1beta1/nova_webhook.go#L128C2-L153

explicit block 2 cells form sharing a rabbit instance since that is not supproted when not using seperat vhost per cell.

we need to enhance ValidateCellTemplates to account for vhost and more imporatnly the new cellTemplate.MessagingBus.Cluster field.

the quetion i have is do we want to enforce that you cant share the same rabbit cluster btween cells via the webhook or jsut document that as unsupproted in our product.

three isnt a reasonable usecase for sharign beyond testing/dev by levrageing vhosts as cells only exist to shard your cloud to supprot scaling beyond the limitats fo a sincel db/rabbit cluster.

my inclindation is to block 2 cells form using the same rabbit cluster in the webhook to ensure that unsupproted configuration are not possible rather then supproting it only for testing.

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

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
@openshift-merge-robot
Copy link
Collaborator

PR needs rebase.

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.

@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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 16, 2026

@lmiccini: The following tests 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/images d5bf4bf link true /test images
ci/prow/precommit-check d5bf4bf link true /test precommit-check
ci/prow/functional d5bf4bf link true /test functional

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.

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.

3 participants