Rabbitmq vhost and user support#320
Rabbitmq vhost and user support#320openshift-merge-bot[bot] merged 2 commits intoopenstack-k8s-operators:mainfrom
Conversation
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/43a7be44149e4a80a82fc6b816e9f29b ✔️ openstack-meta-content-provider-master SUCCESS in 2h 24m 19s |
|
recheck |
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/fcb50a37da904b558dc9d03f6c6b6eb0 ✔️ openstack-meta-content-provider-master SUCCESS in 2h 08m 29s |
|
recheck |
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/ee8b8635fe8241a7aae1b57c091777e0 ✔️ openstack-meta-content-provider-master SUCCESS in 1h 31m 19s |
e216e40 to
8133c4d
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/5deaf237b4c84f9394a94fed49bfe09c ✔️ openstack-meta-content-provider-master SUCCESS in 2h 53m 25s |
amoralej
left a comment
There was a problem hiding this comment.
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.
8133c4d to
f5abf3f
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/18dac81b57c3435e8ee3c89c8255337d ✔️ openstack-meta-content-provider-master SUCCESS in 4h 47m 04s |
db92d54 to
ff28815
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/ae2a6a20346043d7b23e2e2dc5675058 ✔️ openstack-meta-content-provider-master SUCCESS in 2h 52m 59s |
f749ebf to
e2c7b37
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/dab5bd6c4e9c47219f0d96d09cbf2caf ✔️ openstack-meta-content-provider-master SUCCESS in 3h 36m 47s |
e2c7b37 to
a5d1879
Compare
7447609 to
041ac0b
Compare
|
This change depends on a change that failed to merge. Change openstack-k8s-operators/openstack-operator#1779 is needed. |
|
recheck |
|
check-rdo |
api/v1beta1/watcher_webhook.go
Outdated
| // Default NotificationsBus.Cluster if NotificationsBus is present but Cluster is empty | ||
| if spec.NotificationsBus != nil && spec.NotificationsBus.Cluster == "" { | ||
| spec.NotificationsBus.Cluster = "rabbitmq" | ||
| } |
There was a problem hiding this comment.
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.
api/v1beta1/watcher_webhook.go
Outdated
| spec.MessagingBus.Cluster = "rabbitmq" | ||
| } | ||
|
|
||
| // Default NotificationsBus.Cluster if NotificationsBus is present but Cluster is empty |
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
This change depends on a change that failed to merge. Change openstack-k8s-operators/openstack-operator#1779 is needed. |
041ac0b to
83cb18f
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/707dc3a9310d47399eeca91b1f3871fd ❌ openstack-meta-content-provider-master FAILURE in 46m 03s |
83cb18f to
6da4849
Compare
|
This change depends on a change that failed to merge. Change openstack-k8s-operators/openstack-operator#1779 is needed. |
|
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
6da4849 to
24ad917
Compare
|
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. |
|
check-rdo |
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/d3cfa3a785cd4d439a299f9b0ed9e362 ✔️ openstack-meta-content-provider-master SUCCESS in 2h 42m 06s |
|
check-rdo |
|
/lgtm |
|
This change depends on a change that failed to merge. Change openstack-k8s-operators/openstack-operator#1797 is needed. |
|
check-rdo |
|
[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 DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
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 |
e2c9f69
into
openstack-k8s-operators:main
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:
Jira: https://issues.redhat.com/browse/OSPRH-23882
Depends-on: openstack-k8s-operators/openstack-operator#1797