@@ -91,20 +91,20 @@ func ReconcileNova(ctx context.Context, instance *corev1beta1.OpenStackControlPl
9191 for cellName , cellTemplate := range instance .Spec .Nova .Template .CellTemplates {
9292 if cellTemplate .MessagingBus .Cluster == "" {
9393 // Priority 1: Migrate from cell-level deprecated field
94+ // IMPORTANT: We MUST migrate the value to preserve existing custom configurations.
95+ // This means cells with the old default "rabbitmq" will keep that value (not ideal
96+ // for cell1+, but necessary to avoid breaking environments with custom values).
9497 if cellTemplate .CellMessageBusInstance != "" {
9598 cellTemplate .MessagingBus .Cluster = cellTemplate .CellMessageBusInstance
9699 // Priority 2: Inherit from Nova API-level MessagingBus
97100 } else if instance .Spec .Nova .Template .MessagingBus .Cluster != "" {
98101 cellTemplate .MessagingBus = instance .Spec .Nova .Template .MessagingBus
99- // Priority 3: Default to "rabbitmq" (required for CRD validation)
100- } else {
101- cellTemplate .MessagingBus .Cluster = "rabbitmq"
102102 }
103+ // Priority 3: Leave empty for nova-operator webhook to apply per-cell defaults
104+ // (rabbitmq for cell0, rabbitmq-cell1 for cell1, etc.)
103105 }
104- // Clear deprecated field after migration
105- if cellTemplate .MessagingBus .Cluster != "" {
106- cellTemplate .CellMessageBusInstance = ""
107- }
106+ // ALWAYS clear deprecated field to avoid webhook validation conflicts
107+ cellTemplate .CellMessageBusInstance = ""
108108 instance .Spec .Nova .Template .CellTemplates [cellName ] = cellTemplate
109109 }
110110 }
0 commit comments