From 0848f817e435ba1039ac51d5c2f6cab6f9e22e44 Mon Sep 17 00:00:00 2001 From: Amit Uniyal Date: Thu, 29 May 2025 14:36:32 +0530 Subject: [PATCH] Adds kuttle and CI regression test for notifications --- .../control_plane_hook.yaml | 4 + .../default/config-tests/02-assert.yaml | 141 ++++++++++++++++++ .../config-tests/02-enable-notifications.yaml | 7 + ...cleanup-nova.yaml => 03-cleanup-nova.yaml} | 0 .../kuttl/test-suites/default/deps/infra.yaml | 2 + 5 files changed, 154 insertions(+) create mode 100644 test/kuttl/test-suites/default/config-tests/02-assert.yaml create mode 100644 test/kuttl/test-suites/default/config-tests/02-enable-notifications.yaml rename test/kuttl/test-suites/default/config-tests/{02-cleanup-nova.yaml => 03-cleanup-nova.yaml} (100%) diff --git a/ci/nova-operator-tempest-multinode/control_plane_hook.yaml b/ci/nova-operator-tempest-multinode/control_plane_hook.yaml index 236d61e81..f685e2899 100644 --- a/ci/nova-operator-tempest-multinode/control_plane_hook.yaml +++ b/ci/nova-operator-tempest-multinode/control_plane_hook.yaml @@ -24,6 +24,10 @@ path: /spec/nova/template/apiServiceTemplate/replicas value: 2 + - op: replace + path: /spec/nova/template/notificationsBusInstance + value: rabbitmq + - op: replace path: /spec/neutron/template/replicas value: 2 diff --git a/test/kuttl/test-suites/default/config-tests/02-assert.yaml b/test/kuttl/test-suites/default/config-tests/02-assert.yaml new file mode 100644 index 000000000..ef7ef5f9e --- /dev/null +++ b/test/kuttl/test-suites/default/config-tests/02-assert.yaml @@ -0,0 +1,141 @@ +apiVersion: nova.openstack.org/v1beta1 +kind: Nova +metadata: + finalizers: + - openstack.org/nova + name: nova-kuttl + namespace: nova-kuttl-default +status: + apiServiceReadyCount: 1 + metadataServiceReadyCount: 1 + schedulerServiceReadyCount: 1 + conditions: + - message: Setup complete + reason: Ready + status: "True" + type: Ready + - message: Input data complete + reason: Ready + status: "True" + type: InputReady + - message: Setup complete + reason: Ready + status: "True" + type: KeystoneServiceReady + - message: MariaDBAccount creation complete + reason: Ready + status: "True" + type: MariaDBAccountReady + - message: ' Memcached instance has been provisioned' + reason: Ready + status: "True" + type: MemcachedReady + - message: DB create completed + reason: Ready + status: "True" + type: NovaAPIDBReady + - message: API message bus creation successfully + reason: Ready + status: "True" + type: NovaAPIMQReady + - message: Setup complete + reason: Ready + status: "True" + type: NovaAPIReady + - message: All DBs created successfully + reason: Ready + status: "True" + type: NovaAllCellDBReady + - message: All NovaCells are ready + reason: Ready + status: "True" + type: NovaAllCellReady + - message: All message busses created successfully + reason: Ready + status: "True" + type: NovaAllCellsMQReady + - message: There is no more NovaCells to delete + reason: Ready + status: "True" + type: NovaCellsDeletion + - message: Setup complete + reason: Ready + status: "True" + type: NovaMetadataReady + - message: Notification message bus created successfully + reason: Ready + status: "True" + type: NovaNotificationMQReady + - message: Setup complete + reason: Ready + status: "True" + type: NovaSchedulerReady + - message: RoleBinding created + reason: Ready + status: "True" + type: RoleBindingReady + - message: Role created + reason: Ready + status: "True" + type: RoleReady + - message: ServiceAccount created + reason: Ready + status: "True" + type: ServiceAccountReady +--- +apiVersion: v1 +kind: Pod +metadata: + annotations: + openshift.io/scc: anyuid + labels: + service: nova-api + name: nova-kuttl-api-0 +status: + containerStatuses: + - name: nova-kuttl-api-api + ready: true + started: true + - name: nova-kuttl-api-log + ready: true + started: true +--- +apiVersion: v1 +kind: Pod +metadata: + labels: + service: nova-scheduler + name: nova-kuttl-scheduler-0 + ownerReferences: + - apiVersion: apps/v1 + blockOwnerDeletion: true + controller: true + kind: StatefulSet + name: nova-kuttl-scheduler +status: + containerStatuses: + - name: nova-kuttl-scheduler-scheduler + ready: true + started: true +--- +apiVersion: v1 +kind: Pod +metadata: + annotations: + openshift.io/scc: anyuid + labels: + cell: cell0 + service: nova-conductor + statefulset.kubernetes.io/pod-name: nova-kuttl-cell0-conductor-0 + name: nova-kuttl-cell0-conductor-0 + ownerReferences: + - apiVersion: apps/v1 + blockOwnerDeletion: true + controller: true + kind: StatefulSet + name: nova-kuttl-cell0-conductor +status: + containerStatuses: + - name: nova-kuttl-cell0-conductor-conductor + ready: true + started: true diff --git a/test/kuttl/test-suites/default/config-tests/02-enable-notifications.yaml b/test/kuttl/test-suites/default/config-tests/02-enable-notifications.yaml new file mode 100644 index 000000000..15ecdd8f4 --- /dev/null +++ b/test/kuttl/test-suites/default/config-tests/02-enable-notifications.yaml @@ -0,0 +1,7 @@ +apiVersion: nova.openstack.org/v1beta1 +kind: Nova +metadata: + name: nova-kuttl +spec: + secret: osp-secret + notificationsBusInstance: rabbitmq-broadcaster diff --git a/test/kuttl/test-suites/default/config-tests/02-cleanup-nova.yaml b/test/kuttl/test-suites/default/config-tests/03-cleanup-nova.yaml similarity index 100% rename from test/kuttl/test-suites/default/config-tests/02-cleanup-nova.yaml rename to test/kuttl/test-suites/default/config-tests/03-cleanup-nova.yaml diff --git a/test/kuttl/test-suites/default/deps/infra.yaml b/test/kuttl/test-suites/default/deps/infra.yaml index 1dd64e878..428fb21d2 100644 --- a/test/kuttl/test-suites/default/deps/infra.yaml +++ b/test/kuttl/test-suites/default/deps/infra.yaml @@ -18,6 +18,8 @@ spec: replicas: 1 rabbitmq-cell1: replicas: 1 + rabbitmq-broadcaster: + replicas: 1 memcached: templates: memcached: