Skip to content

Commit 6870d95

Browse files
committed
Propagate rabbitmq user to nova-cellX secret
In addition to $subject, added configurations for functional tests: - CRDInstallOptions.MaxTime: 5 minutes (line 134) - ControlPlaneStartTimeout: 2 minutes (line 137) - ControlPlaneStopTimeout: 2 minutes (line 138) - APIServer arguments (lines 140-145): - --request-timeout=5m - --max-requests-inflight=800 - --max-mutating-requests-inflight=400 - Etcd quota (lines 147-150): 8GB (--quota-backend-bytes=8589934592) These changes will help improve CI test reliability by extending timeouts to prevent premature test failures during resource-constrained CI runs and increasing the API server's request handling capacity.
1 parent 2e0a55b commit 6870d95

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

internal/controller/novacell_controller.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,9 +806,16 @@ func (r *NovaCellReconciler) generateComputeConfigs(
806806

807807
hashes := make(map[string]env.Setter)
808808

809+
// Propagate RabbitMQ user names to compute-config secret so the
810+
// openstack-operator can track which RabbitMQUser CRs are in use
811+
extraData := map[string]string{
812+
RabbitmqUserNameSelector: string(secret.Data[RabbitmqUserNameSelector]),
813+
NotificationRabbitmqUserNameSelector: string(secret.Data[NotificationRabbitmqUserNameSelector]),
814+
}
815+
809816
configName := instance.GetName() + "-compute-config"
810817
err := r.GenerateConfigs(
811-
ctx, h, instance, configName, &hashes, templateParameters, map[string]string{}, cmLabels, map[string]string{},
818+
ctx, h, instance, configName, &hashes, templateParameters, extraData, cmLabels, map[string]string{},
812819
)
813820
if err != nil {
814821
return err

test/functional/novacell_controller_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,13 @@ var _ = Describe("NovaCell controller", func() {
339339
)
340340

341341
Expect(GetNovaCell(cell1.CellCRName).Status.Hash).To(HaveKey(cell1.ComputeConfigSecretName.Name))
342+
343+
// Verify that RabbitMQ user names are propagated to the compute-config secret
344+
// so the openstack-operator can track which RabbitMQUser CRs are in use
345+
Expect(computeConfigData.Data).To(
346+
HaveKey(controllers.RabbitmqUserNameSelector))
347+
Expect(computeConfigData.Data).To(
348+
HaveKey(controllers.NotificationRabbitmqUserNameSelector))
342349
})
343350

344351
It("should have quorum queues disabled by default and enabled when configured", func() {

test/functional/suite_test.go

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,25 @@ var _ = BeforeSuite(func() {
131131
Paths: []string{
132132
networkv1CRD,
133133
},
134+
MaxTime: 5 * time.Minute,
135+
},
136+
ErrorIfCRDPathMissing: true,
137+
ControlPlaneStartTimeout: 2 * time.Minute,
138+
ControlPlaneStopTimeout: 2 * time.Minute,
139+
ControlPlane: envtest.ControlPlane{
140+
APIServer: &envtest.APIServer{
141+
Args: []string{
142+
"--request-timeout=5m",
143+
"--max-requests-inflight=800",
144+
"--max-mutating-requests-inflight=400",
145+
},
146+
},
147+
Etcd: &envtest.Etcd{
148+
Args: []string{
149+
"--quota-backend-bytes=8589934592",
150+
},
151+
},
134152
},
135-
ErrorIfCRDPathMissing: true,
136153
WebhookInstallOptions: envtest.WebhookInstallOptions{
137154
Paths: []string{filepath.Join("..", "..", "config", "webhook")},
138155
// NOTE(gibi): if localhost is resolved to ::1 (ipv6) then starting

0 commit comments

Comments
 (0)