Skip to content

Commit ba9d53e

Browse files
committed
Revert "[ovn-controller] Don't create ovn-controller if nicMappings empty"
This reverts commit a02a159. This change created a bug on the adoption where all the gates reaches TIME_OUT, reverting this patch to unblock prod chain while fixing it. The problem that this patch was introducing was that edpm deployment expects a config map created by ovn-operator (ovncontroller) called ovncontroller-config. With this patch the ovncontroller CR was not created and the ovn-operator was not reconciling this object, which was needed to create the said config map. Related: OSPRH-7463 Related: OSPCIX-504
1 parent 77167c9 commit ba9d53e

File tree

14 files changed

+1
-469
lines changed

14 files changed

+1
-469
lines changed

config/samples/base/openstackcontrolplane/core_v1beta1_openstackcontrolplane.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ spec:
9797
replicas: 1
9898
dbType: SB
9999
storageRequest: 10G
100-
ovnController: {}
101100
ovnNorthd:
102101
replicas: 1
102+
ovnController: {}
103103
neutron:
104104
template:
105105
databaseInstance: openstack

config/samples/nad_datacentre.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

pkg/openstack/ovn.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,6 @@ func ReconcileOVNController(ctx context.Context, instance *corev1beta1.OpenStack
314314
return false, err
315315
}
316316
return false, nil
317-
} else if len(instance.Spec.Ovn.Template.OVNController.NicMappings) == 0 {
318-
// If nicMappings is not configured there's no need to start ovn-controller
319-
Log.Info("OVN Controller has no nicMappings configured, forcing ready condition to true.")
320-
if _, err := EnsureDeleted(ctx, helper, OVNController); err != nil {
321-
return false, err
322-
}
323-
return true, nil
324317
}
325318

326319
ovnControllerSpec := &instance.Spec.Ovn.Template.OVNController

tests/functional/ctlplane/openstackoperator_controller_test.go

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,11 +1620,6 @@ var _ = Describe("OpenStackOperator controller", func() {
16201620
"dbType": "SB",
16211621
},
16221622
},
1623-
"ovnController": map[string]interface{}{
1624-
"nicMappings": map[string]interface{}{
1625-
"datacentre": "ospbr",
1626-
},
1627-
},
16281623
},
16291624
}
16301625
DeferCleanup(
@@ -1675,37 +1670,6 @@ var _ = Describe("OpenStackOperator controller", func() {
16751670
}, timeout, interval).Should(Succeed())
16761671
})
16771672

1678-
It("should remove ovn-controller if nicMappings are removed", func() {
1679-
// Update spec
1680-
Eventually(func(g Gomega) {
1681-
OSCtlplane := GetOpenStackControlPlane(names.OpenStackControlplaneName)
1682-
OSCtlplane.Spec.Ovn.Template.OVNController.NicMappings = nil
1683-
g.Expect(k8sClient.Update(ctx, OSCtlplane)).Should(Succeed())
1684-
}, timeout, interval).Should(Succeed())
1685-
1686-
// ovn services exist
1687-
Eventually(func(g Gomega) {
1688-
ovnNorthd := ovn.GetOVNNorthd(names.OVNNorthdName)
1689-
g.Expect(ovnNorthd).Should(Not(BeNil()))
1690-
}, timeout, interval).Should(Succeed())
1691-
1692-
// If nicMappings are not configured, ovnController shouldn't spawn
1693-
Eventually(func(g Gomega) {
1694-
instance := &ovnv1.OVNController{}
1695-
g.Expect(th.K8sClient.Get(th.Ctx, names.OVNControllerName, instance)).Should(Not(Succeed()))
1696-
}, timeout, interval).Should(Succeed())
1697-
1698-
Eventually(func(g Gomega) {
1699-
ovnDbServerNB := ovn.GetOVNDBCluster(names.OVNDbServerNBName)
1700-
g.Expect(ovnDbServerNB).Should(Not(BeNil()))
1701-
}, timeout, interval).Should(Succeed())
1702-
1703-
Eventually(func(g Gomega) {
1704-
ovnDbServerSB := ovn.GetOVNDBCluster(names.OVNDbServerSBName)
1705-
g.Expect(ovnDbServerSB).Should(Not(BeNil()))
1706-
}, timeout, interval).Should(Succeed())
1707-
})
1708-
17091673
It("should remove OVN resources on disable", func() {
17101674
Eventually(func(g Gomega) {
17111675
OSCtlplane := GetOpenStackControlPlane(names.OpenStackControlplaneName)

tests/functional/ctlplane/openstackversion_controller_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,6 @@ var _ = Describe("OpenStackOperator controller", func() {
239239
"dbType": "SB",
240240
},
241241
},
242-
"ovnController": map[string]interface{}{
243-
"nicMappings": map[string]interface{}{
244-
"datacentre": "ospbr",
245-
},
246-
},
247242
},
248243
}
249244
DeferCleanup(

tests/kuttl/tests/ctlplane-basic-deployment-with-nicMappings/01-create-nic-mappings.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/kuttl/tests/ctlplane-basic-deployment-with-nicMappings/02-assert-deploy-openstack.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/kuttl/tests/ctlplane-basic-deployment-with-nicMappings/02-deploy-openstack.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/kuttl/tests/ctlplane-basic-deployment-with-nicMappings/03-add-ovn-nic-mappings.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/kuttl/tests/ctlplane-basic-deployment-with-nicMappings/03-assert.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)