Skip to content

Add Notfications message bus instance for Nova CRD - #948

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
bogdando:OSPRH-14486
May 21, 2025
Merged

openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
bogdando:OSPRH-14486

Conversation

@bogdando

@bogdando bogdando commented Mar 27, 2025 •

Copy link
Copy Markdown
Contributor

Extend CRDs to support a RabbitMqCluster reference as AMQP instance for
notifications.

To provide a way for human user to define the notifications bus for
Nova CR via the OpenStackControlPlane CR's nova section, add a new
field to the NovaSpecCore as that is the struct used when the
OpenStackControlPlaneSpec struct is defined.

At NovaSpec level having just "" or a name of the bus is OK as either
we need a bus, or we don't need notifications at all. However, for
empedded NovaSpecCore we might need the 3rd possibility to "inherit
from somewhere higher", which we represent as: *string field where null
means inherit, "" means disable notification, "foo" means send
notification to bus foo.

Note that overriding NotificationsBusInstance for cells is not
supported as that implies that consumers of notifications can maintain
simultanous AMQP connections via multiple transport_url endpoints,
which is not a thing in Openstack.

Assume that in the implementation the required information will be
transferred via the existing internal secret via notifications specific
transport_url key (as the transport_url key is already taken by the RPC
bus value). Thus we do not modify other Nova services' CRDs.

Note that the pointer type is redundant for NovaSpec, but since
we have already defined it as a such in NovaSpecCore, and
changing the types system is not planned (requires changes in openstack
operator), it should be used as is for also NovaSpec.
However there shall be only a real use of a nil value in
NovaSpecCore (while unused in NovaSpec).

Jira: OSPRH-14486

@openshift-ci
openshift-ci Bot requested review from dprince and viroel March 27, 2025 15:32
@bogdando

Copy link
Copy Markdown
Contributor Author

Note, implementation to follow after we agree on this design

Comment thread api/bases/nova.openstack.org_nova.yaml Resolved
Comment thread api/bases/nova.openstack.org_nova.yaml Resolved
Comment thread api/bases/nova.openstack.org_nova.yaml Resolved
Comment thread api/bases/nova.openstack.org_nova.yaml 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/a1dafc73aba747d2b4c71d4881d905ea

❌ openstack-meta-content-provider FAILURE in 17m 24s
⚠️ 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

@bogdando

Copy link
Copy Markdown
Contributor Author

/test functional

@bogdando
bogdando requested a review from auniyal61 March 27, 2025 17:31
@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/1eeb57f5cbe64aad9599a266e5e29384

✔️ openstack-meta-content-provider SUCCESS in 2h 27m 55s
❌ nova-operator-kuttl RETRY_LIMIT in 38m 26s
✔️ nova-operator-tempest-multinode SUCCESS in 2h 07m 32s
❌ nova-operator-tempest-multinode-ceph FAILURE in 1h 21m 09s

Comment thread api/v1beta1/nova_types.go Resolved
Comment thread api/bases/nova.openstack.org_nova.yaml Resolved
@bogdando
bogdando requested a review from auniyal61 March 28, 2025 14:40
@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/5b55ab6e600348ffba1aab94488091f3

✔️ openstack-meta-content-provider SUCCESS in 3h 05m 35s
❌ nova-operator-kuttl RETRY_LIMIT in 38m 01s
✔️ nova-operator-tempest-multinode SUCCESS in 2h 14m 38s
✔️ nova-operator-tempest-multinode-ceph SUCCESS in 2h 44m 21s

Comment thread api/v1beta1/nova_types.go Resolved
Comment thread api/v1beta1/nova_types.go Resolved
Comment thread api/v1beta1/novacell_types.go Resolved
Comment thread api/bases/nova.openstack.org_nova.yaml Resolved
Comment thread api/bases/nova.openstack.org_nova.yaml 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/86e9cd0703e64d78a300355bb611dcfc

❌ openstack-meta-content-provider FAILURE in 16m 15s
⚠️ 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

@bogdando
bogdando requested a review from gibizer March 31, 2025 13:56
@bogdando
bogdando force-pushed the OSPRH-14486 branch 2 times, most recently from 4cb3e21 to 104281a Compare April 2, 2025 14:04
@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/ca7e82a99dfd42018ddaa9f460a06d77

✔️ openstack-meta-content-provider SUCCESS in 1h 06m 39s
❌ nova-operator-kuttl RETRY_LIMIT in 37m 04s
❌ nova-operator-tempest-multinode FAILURE in 35m 15s
❌ nova-operator-tempest-multinode-ceph FAILURE in 35m 38s

@bogdando
bogdando dismissed stale reviews from gibizer and auniyal61 April 3, 2025 09:57

re iterate once you have time

@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/1301d3573c6d480eaceb86205c53373a

❌ openstack-meta-content-provider FAILURE in 14m 43s
⚠️ 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

@gibizer gibizer 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.

@bogdando awesome progress. Thanks for trying the type split. The result looks good to me. My only remaining request is about a doc nit on the NovaSpec field. Otherwise I think this is ready to be implemented.

I acknowledge that in this iteration we are intentionally not supporting the cellTemplate level override as we see less user value in that functionality. As we discussed before it can be added later when needed with a backward compatible way.

Comment thread api/v1beta1/nova_types.go Resolved
Comment thread api/v1beta1/nova_types.go Resolved
Comment thread api/v1beta1/nova_webhook.go Resolved
Comment thread api/v1beta1/nova_webhook.go Resolved
Comment thread api/v1beta1/nova_webhook.go Resolved
Comment thread api/v1beta1/nova_webhook.go Resolved
Comment thread api/v1beta1/nova_webhook.go Resolved

@gibizer gibizer 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.

Looks OK to me.

@openshift-ci openshift-ci Bot added the lgtm label Apr 17, 2025
@bogdando bogdando mentioned this pull request Apr 17, 2025
@dprince

dprince commented Apr 19, 2025

Copy link
Copy Markdown
Contributor

Perhaps it was in another commit but will the mechanism here still use the TransportURL from infra-operator to obtain the secret for the notification bus?

@auniyal61

auniyal61 commented Apr 19, 2025 •

Copy link
Copy Markdown
Contributor

Perhaps it was in another commit but will the mechanism here still use the TransportURL from infra-operator to obtain the secret for the notification bus?

yes, human-operator will add rabbit in oscp CR, that rabbit will be recognized in Nova as notifications-broadcaster, transport_url part of this rabbit secret will be from infra-operator.
@dprince ^^

@gibizer

gibizer commented Apr 22, 2025

Copy link
Copy Markdown
Contributor

Perhaps it was in another commit but will the mechanism here still use the TransportURL from infra-operator to obtain the secret for the notification bus?

Yes, it will.

Comment thread api/v1beta1/zz_generated.deepcopy.go Resolved
@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/nova-operator for 948,654dc0af5b166fd73e03844b686af942dfaa00a1

Extend CRDs to support a RabbitMqCluster reference as AMQP instance for
notifications.

To provide a way for human user to define the notifications bus for
Nova CR via the OpenStackControlPlane CR's nova section, add a new
field to the NovaSpecCore as that is the struct used when the
OpenStackControlPlaneSpec struct is defined.

At NovaSpec level having just "" or a name of the bus is OK as either
we need a bus, or we don't need notifications at all.  However, for
empedded NovaSpecCore we might need the 3rd possibility to "inherit
from somewhere higher", which we represent as: *string field where null
means inherit, "" means disable notification, "foo" means send
notification to bus foo.

Note that overriding NotificationsBusInstance for cells is not
supported as that implies that consumers of notifications can maintain
simultanous AMQP connections via multiple transport_url endpoints,
which is not a thing in Openstack.

Assume that in the implementation the required information will be
transferred via the existing internal secret via notifications specific
transport_url key (as the transport_url key is already taken by the RPC
bus value). Thus we do not modify other Nova services' CRDs.

Note that the pointer type is redundant for NovaSpec, but since
we have already defined it as a such in NovaSpecCore, and
changing the types system is not planned (requires changes in openstack
operator), it should be used as is for also NovaSpec.
However there shall be only a real use of a nil value in
NovaSpecCore (while unused in NovaSpec).

Signed-off-by: Bohdan Dobrelia <bdobreli@redhat.com>
@gibizer

gibizer commented May 21, 2025

Copy link
Copy Markdown
Contributor

just rebased to resolve the merge conflict

@SeanMooney SeanMooney 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.

/lgtm

condition "github.com/openstack-k8s-operators/lib-common/modules/common/condition"
"github.com/openstack-k8s-operators/lib-common/modules/common/tls"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"

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.

hum, i guess this moved because of different go-fmt versions?

the end result is identical so not important either way.

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.

yeah I also suspect go fmt being the reason here.

@openshift-ci

openshift-ci Bot commented May 21, 2025

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bogdando, gibizer, SeanMooney

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:
  • OWNERS [SeanMooney,bogdando,gibizer]

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

@bogdando

Copy link
Copy Markdown
Contributor Author

/cherry-pick 18.0-fr2

@openshift-cherrypick-robot

Copy link
Copy Markdown

@bogdando: new pull request created: #985

Details

In response to this:

/cherry-pick 18.0-fr2

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.

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.

9 participants