Skip to content

Rabbitmq vhost and user support - #320

Merged
openshift-merge-bot[bot] merged 2 commits into
openstack-k8s-operators:mainfrom
lmiccini:rabbitmq_vhosts
Feb 7, 2026
Merged

openshift-merge-bot[bot] merged 2 commits into
openstack-k8s-operators:mainfrom
lmiccini:rabbitmq_vhosts

Conversation

@lmiccini

@lmiccini lmiccini commented Dec 19, 2025 •

Copy link
Copy Markdown
Contributor

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

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

@softwarefactory-delete-me

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/43a7be44149e4a80a82fc6b816e9f29b

✔️ openstack-meta-content-provider-master SUCCESS in 2h 24m 19s
❌ watcher-operator-validation-master FAILURE in 36m 03s
✔️ openstack-meta-content-provider-epoxy SUCCESS in 3h 35m 19s
✔️ watcher-operator-validation-epoxy SUCCESS in 1h 55m 29s
❌ watcher-operator-validation-epoxy-ocp4-16 FAILURE in 2h 17m 30s
✔️ noop SUCCESS in 0s
✔️ watcher-operator-kuttl SUCCESS in 47m 25s

@lmiccini

Copy link
Copy Markdown
Contributor Author

recheck

@softwarefactory-delete-me

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

✔️ openstack-meta-content-provider-master SUCCESS in 2h 08m 29s
❌ watcher-operator-validation-master FAILURE in 29m 06s
✔️ openstack-meta-content-provider-epoxy SUCCESS in 2h 02m 35s
❌ watcher-operator-validation-epoxy FAILURE in 1h 10m 16s
❌ watcher-operator-validation-epoxy-ocp4-16 FAILURE in 19m 16s
✔️ noop SUCCESS in 0s
✔️ watcher-operator-kuttl SUCCESS in 48m 51s

@lmiccini

Copy link
Copy Markdown
Contributor Author

recheck

@softwarefactory-delete-me

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

✔️ openstack-meta-content-provider-master SUCCESS in 1h 31m 19s
❌ watcher-operator-validation-master FAILURE in 32m 32s
✔️ openstack-meta-content-provider-epoxy SUCCESS in 2h 24m 58s
✔️ watcher-operator-validation-epoxy SUCCESS in 1h 55m 32s
❌ watcher-operator-validation-epoxy-ocp4-16 FAILURE in 21m 02s
✔️ noop SUCCESS in 0s
✔️ watcher-operator-kuttl SUCCESS in 47m 15s

@softwarefactory-delete-me

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/5deaf237b4c84f9394a94fed49bfe09c

✔️ openstack-meta-content-provider-master SUCCESS in 2h 53m 25s
❌ watcher-operator-validation-master FAILURE in 2h 17m 48s
✔️ openstack-meta-content-provider-epoxy SUCCESS in 2h 17m 27s
✔️ watcher-operator-validation-epoxy SUCCESS in 1h 50m 53s
❌ watcher-operator-validation-epoxy-ocp4-16 FAILURE in 1h 51m 03s
✔️ noop SUCCESS in 0s
✔️ watcher-operator-kuttl SUCCESS in 44m 27s

@amoralej amoralej left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd like to also modify the kuttl tests to cover the new parameters. You can use the existing kuttl tests, i.e. the watcher-notification or some other, watcher-topology, etc... to test non-default values for the new spec params.

I also left some inline comments.

Comment thread api/v1beta1/watcher_webhook.go Resolved
@softwarefactory-delete-me

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/18dac81b57c3435e8ee3c89c8255337d

✔️ openstack-meta-content-provider-master SUCCESS in 4h 47m 04s
❌ watcher-operator-validation-master FAILURE in 2h 15m 03s
✔️ openstack-meta-content-provider-epoxy SUCCESS in 3h 26m 41s
✔️ watcher-operator-validation-epoxy SUCCESS in 1h 54m 15s
✔️ watcher-operator-validation-epoxy-ocp4-16 SUCCESS in 2h 00m 16s
✔️ noop SUCCESS in 0s
❌ watcher-operator-kuttl FAILURE in 56m 42s

@lmiccini
lmiccini force-pushed the rabbitmq_vhosts branch 4 times, most recently from db92d54 to ff28815 Compare January 10, 2026 15:41
@softwarefactory-delete-me

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

✔️ openstack-meta-content-provider-master SUCCESS in 2h 52m 59s
❌ watcher-operator-validation-master FAILURE in 2h 15m 58s
✔️ openstack-meta-content-provider-epoxy SUCCESS in 2h 30m 09s
✔️ watcher-operator-validation-epoxy SUCCESS in 2h 05m 59s
✔️ watcher-operator-validation-epoxy-ocp4-16 SUCCESS in 2h 00m 14s
✔️ noop SUCCESS in 0s
❌ watcher-operator-kuttl FAILURE in 58m 40s

@lmiccini
lmiccini force-pushed the rabbitmq_vhosts branch 2 times, most recently from f749ebf to e2c7b37 Compare January 12, 2026 08:42
@softwarefactory-delete-me

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

✔️ openstack-meta-content-provider-master SUCCESS in 3h 36m 47s
❌ watcher-operator-validation-master FAILURE in 2h 14m 30s
✔️ openstack-meta-content-provider-epoxy SUCCESS in 2h 13m 48s
✔️ watcher-operator-validation-epoxy SUCCESS in 1h 52m 31s
❌ watcher-operator-validation-epoxy-ocp4-16 FAILURE in 19m 50s
✔️ noop SUCCESS in 0s
❌ watcher-operator-kuttl FAILURE in 57m 23s

@softwarefactory-delete-me

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

recheck

@lmiccini

Copy link
Copy Markdown
Contributor Author

check-rdo

Comment thread api/v1beta1/watcher_webhook.go Outdated
Comment on lines +75 to +78
// Default NotificationsBus.Cluster if NotificationsBus is present but Cluster is empty
if spec.NotificationsBus != nil && spec.NotificationsBus.Cluster == "" {
spec.NotificationsBus.Cluster = "rabbitmq"
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This means the user set up user and/or vhost but not cluster iiuc. For me that should fail validation. Setting the same rabbitmq for messagingBus and notificationBus should be something that could only be done by explicitely setting it, not by defaulting rules, IMO.

Also, i checked that adding any wrong content to NotificationsBus, i.e. {}, ends up in this setting rabbitmq for notifications.

Comment thread api/v1beta1/watcher_webhook.go Outdated
spec.MessagingBus.Cluster = "rabbitmq"
}

// Default NotificationsBus.Cluster if NotificationsBus is present but Cluster is empty

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I liked the previous way of overriding spec.NotificationsBus.Cluster from NotificationsBusInstance if this is set and NotificationsBus.Cluster was empty. I think it'd avoid racy situations between openstack-operators and watcher-operator in update conditions. Said this, i guess it will run fine in most cases and will end up in reconciling properly (unless there is any other problem in the update related to the openstackcontrolplane content, i.e.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As reminded by Luca, the webhook only runs in the openstack-operator for the openstackcontrolplane, not in the watcher-operator, so actually, adding that logic to the webhook will not help to fix the race i mentioned before.

@lmiccini lmiccini Jan 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think this is a valid concern if each service operator runs in isolation (like in CI). Since we embed the webhooks in the openstack-operator I feel like we are somehow guaranteed that the defaulting/migration logic will run in the expected order, and that the watcher-operator will receive a valid configuration.

@softwarefactory-delete-me

Copy link
Copy Markdown

This change depends on a change that failed to merge.

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

@softwarefactory-delete-me

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/707dc3a9310d47399eeca91b1f3871fd

❌ openstack-meta-content-provider-master FAILURE in 46m 03s
⚠️ watcher-operator-validation-master SKIPPED Skipped due to failed job openstack-meta-content-provider-master
❌ openstack-meta-content-provider-epoxy FAILURE in 20m 22s
⚠️ watcher-operator-validation-epoxy SKIPPED Skipped due to failed job openstack-meta-content-provider-epoxy
⚠️ watcher-operator-validation-epoxy-ocp4-16 SKIPPED Skipped due to failed job openstack-meta-content-provider-epoxy
✔️ noop SUCCESS in 0s
⚠️ watcher-operator-kuttl SKIPPED Skipped due to failed job openstack-meta-content-provider-master

@softwarefactory-delete-me

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

check-rdo

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-23882
@softwarefactory-delete-me

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 1797,321b602e6522bdd67bc1132a6b497508d15e1b26

@lmiccini

lmiccini commented Feb 6, 2026

Copy link
Copy Markdown
Contributor Author

check-rdo

@softwarefactory-delete-me

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

✔️ openstack-meta-content-provider-master SUCCESS in 2h 42m 06s
✔️ watcher-operator-validation-master SUCCESS in 1h 59m 53s
✔️ openstack-meta-content-provider-epoxy SUCCESS in 2h 11m 19s
✔️ watcher-operator-validation-epoxy SUCCESS in 1h 51m 17s
❌ watcher-operator-validation-epoxy-ocp4-16 RETRY_LIMIT in 3m 36s
✔️ noop SUCCESS in 0s
✔️ watcher-operator-kuttl SUCCESS in 47m 21s

@amoralej

amoralej commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

check-rdo

@amoralej

amoralej commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@softwarefactory-delete-me

Copy link
Copy Markdown

This change depends on a change that failed to merge.

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

@lmiccini

lmiccini commented Feb 6, 2026

Copy link
Copy Markdown
Contributor Author

check-rdo

@openshift-ci

openshift-ci Bot commented Feb 6, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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

@SeanMooney

Copy link
Copy Markdown
Collaborator

as disucssed on slack i have add do-not-merge/hold purly to stop ethis merging until the depency merges and i have add appvoed so that the bot can merge it once folks remvoe the hold.

i have quickly reviewed this again and im not seeign any major issues that should prevent use merging this so feel free to remove the hold label when openstack-k8s-operators/openstack-operator#1797 has merged

@openshift-merge-bot
openshift-merge-bot Bot merged commit e2c9f69 into openstack-k8s-operators:main Feb 7, 2026
1 check 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