Skip to content

Commit dbd14aa

Browse files
Merge pull request #2060 from jistr/f/monolithic-update-removal
Removal of monolithic update
2 parents 5e58e9e + edfd8e2 commit dbd14aa

7 files changed

Lines changed: 32 additions & 100 deletions

‎config/services/dataplane_v1beta1_openstackdataplaneservice_update.yaml‎

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

‎docs/assemblies/proc_minor-update-staged-rollout.adoc‎

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ starts.
6161
| No
6262

6363
| _(completion)_
64-
| Data-plane services on compute nodes
65-
| *Yes* — create a full `OpenStackDataPlaneDeployment`
64+
| data plane services on compute nodes
65+
| *Yes* — create an `update-services` `OpenStackDataPlaneDeployment`
6666
|===
6767

6868
[NOTE]
6969
Two stages require you to create an `OpenStackDataPlaneDeployment` manually.
70-
The `ovn-dataplane` stage and the final data-plane completion step do not self-drive —
70+
The `ovn-dataplane` stage and the final data plane completion step do not self-drive —
7171
the controller waits for the corresponding deployment to finish before advancing.
7272
See <<required-manual-deployments>>.
7373

@@ -197,8 +197,8 @@ Continue advancing through the remaining stages as needed:
197197

198198
=== Step 5 — Complete the update
199199

200-
When you are ready to run the final data-plane update on compute nodes, first create the
201-
full dataplane deployment (see <<required-manual-deployments>>),
200+
When you are ready to update the remaining data plane services on compute nodes, first
201+
create the data plane services update deployment (see <<required-manual-deployments>>),
202202
then remove the annotation to let the update finish:
203203

204204
[source,bash]
@@ -230,7 +230,7 @@ The output should show `<new-version>`.
230230
Two stages in the process do not self-start. You must create an
231231
`OpenStackDataPlaneDeployment` before (or at the same time as) advancing past each of them.
232232

233-
=== OVN data-plane deployment
233+
=== OVN data plane deployment
234234

235235
Required before the `ovn-dataplane` stage can complete. This deployment updates only the
236236
OVN-related services on compute nodes.
@@ -254,28 +254,29 @@ spec:
254254
$ oc apply -f edpm-deployment-ovn-update.yaml
255255
----
256256

257-
=== Full data-plane update deployment
257+
=== Data plane services update deployment
258258

259-
Required before the final completion step can finish. This deployment updates all remaining
260-
services on compute nodes.
259+
Required before the final completion step can finish. This deployment updates service
260+
containers and the limited set of packages handled by the `update-services` service on
261+
compute nodes.
261262

262263
[source,yaml]
263264
----
264265
apiVersion: dataplane.openstack.org/v1beta1
265266
kind: OpenStackDataPlaneDeployment
266267
metadata:
267-
name: edpm-deployment-update
268+
name: edpm-deployment-update-services
268269
namespace: openstack
269270
spec:
270271
nodeSets:
271272
- openstack-edpm-ipam
272273
servicesOverride:
273-
- update
274+
- update-services
274275
----
275276

276277
[source,bash]
277278
----
278-
$ oc apply -f edpm-deployment-update.yaml
279+
$ oc apply -f edpm-deployment-update-services.yaml
279280
----
280281

281282
== Pausing a running update
@@ -307,7 +308,7 @@ all stages automatically. You still need to create both dataplane deployments at
307308
time:
308309

309310
. Create the OVN dataplane deployment before or immediately after starting the update.
310-
. Create the dataplane update deployment before the final completion step.
311+
. Create the data plane services update deployment before the final completion step.
311312

312313
[source,bash,subs="+quotes"]
313314
----

‎docs/assemblies/proc_updating-the-data-plane-ovn.adoc‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ The following example output shows the condition has been met:
2222
openstackversion.core.openstack.org/openstack-galera-network-isolation condition met
2323
----
2424

25-
. Create an `OpenStackDataPlaneDeployment` CR and save it to a file named `openstack-edpm-update.yaml` on your workstation.
25+
. Create an `OpenStackDataPlaneDeployment` CR and save it to a file named `openstack-edpm-update-ovn.yaml` on your workstation.
2626
+
2727
----
2828
apiVersion: dataplane.openstack.org/v1beta1
2929
kind: OpenStackDataPlaneDeployment
3030
metadata:
31-
name: edpm-deployment-ipam-update
31+
name: edpm-deployment-ipam-update-ovn
3232
spec:
3333
nodeSets:
3434
- openstack-edpm-ipam
@@ -44,21 +44,21 @@ spec:
4444
[NOTE]
4545
The `servicesOverride` field is set to include only `ovn` as the `ovn` service must be updated first in isolation. If using a custom service to manage `ovn`, then use that custom service name instead of `ovn` in `servicesOverride`. Additionally if other custom services must be updated at the same time as `ovn`, then they can be included in `servicesOverride` as well.
4646

47-
. Save the `openstack-edpm-update.yaml` deployment file.
47+
. Save the `openstack-edpm-update-ovn.yaml` deployment file.
4848

4949
. Update the data plane:
5050
+
5151
----
52-
$ oc create -f openstack-edpm-update.yaml
52+
$ oc create -f openstack-edpm-update-ovn.yaml
5353
----
5454

5555
. Verify that the data plane update deployment succeeded:
5656
+
5757
----
5858
$ oc get openstackdataplanedeployment
59-
NAME STATUS MESSAGE
60-
edpm-deployment-ipam True Setup Complete
61-
edpm-deployment-ipam-update True Setup Complete
59+
NAME STATUS MESSAGE
60+
edpm-deployment-ipam True Setup Complete
61+
edpm-deployment-ipam-update-ovn True Setup Complete
6262
----
6363

6464
Once OVN has been updated on the data plane, the rest of the control plane minor update will automatically proceed. Once the control plane minor update is finished, the rest of the data plane can be updated.

‎docs/assemblies/proc_updating-the-data-plane.adoc‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ spec:
3535
- ...
3636
- <nodeSet_name>
3737
servicesOverride:
38-
- update
38+
- update-services
3939
----
4040
+
4141
* Replace `<nodeSet_name>` with the names of the `OpenStackDataPlaneNodeSet` CRs that you want to include in your data plane minor update.
4242
+
4343
[NOTE]
44-
The `servicesOverride` field is set to include only `update`. The `update` service applies only the tasks needed to update the packages and containers on the EDPM nodes. When using custom services, include those here as well, or their equivalent custom services that apply the needed update tasks.
44+
The `servicesOverride` field is set to include only `update-services`. The `update-services` service applies only the tasks needed to update the containers and a limited set of packages on the EDPM nodes. When using custom services, include those here as well, or their equivalent custom services that apply the needed update tasks.
4545

4646
. Save the `openstack-edpm-update-services.yaml` deployment file.
4747

@@ -55,10 +55,10 @@ $ oc create -f openstack-edpm-update-services.yaml
5555
+
5656
----
5757
$ oc get openstackdataplanedeployment
58-
NAME STATUS MESSAGE
59-
edpm-deployment-ipam True Setup Complete
60-
edpm-deployment-ipam-update True Setup Complete
61-
edpm-deployment-ipam-update-services True Setup Complete
58+
NAME STATUS MESSAGE
59+
edpm-deployment-ipam True Setup Complete
60+
edpm-deployment-ipam-update-ovn True Setup Complete
61+
edpm-deployment-ipam-update-services True Setup Complete
6262
----
6363

6464
.Troubleshooting

‎internal/controller/dataplane/openstackdataplanenodeset_controller.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ func checkDeployment(ctx context.Context, helper *helper.Helper,
667667
services = instance.Spec.Services
668668
}
669669

670-
// For each service, check if EDPMServiceType is "update" or "update-services", and
670+
// For each service, check if EDPMServiceType is "update-services", and
671671
// if so, copy Deployment.Status.DeployedVersion to
672672
// NodeSet.Status.DeployedVersion
673673
for _, serviceName := range services {
@@ -682,11 +682,11 @@ func checkDeployment(ctx context.Context, helper *helper.Helper,
682682
return status, err
683683
}
684684

685-
if service.Spec.EDPMServiceType != "update" && service.Spec.EDPMServiceType != "update-services" {
685+
if service.Spec.EDPMServiceType != "update-services" {
686686
continue
687687
}
688688

689-
// An "update" or "update-services" service Deployment has been completed, so
689+
// An "update-services" service Deployment has been completed, so
690690
// set the NodeSet's DeployedVersion to the Deployment's
691691
// DeployedVersion.
692692
instance.Status.DeployedVersion = deployment.Status.DeployedVersion

‎test/functional/dataplane/base_test.go‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -334,15 +334,6 @@ func DefaultDataPlaneDeploymentSpec() map[string]interface{} {
334334
}
335335
}
336336

337-
func MinorUpdateDataPlaneDeploymentSpec() map[string]interface{} {
338-
return map[string]interface{}{
339-
"nodeSets": []string{
340-
"edpm-compute-nodeset",
341-
},
342-
"servicesOverride": []string{"update"},
343-
}
344-
}
345-
346337
func MinorUpdateServicesDataPlaneDeploymentSpec() map[string]interface{} {
347338
return map[string]interface{}{
348339
"nodeSets": []string{

‎test/functional/dataplane/openstackdataplanenodeset_controller_test.go‎

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ var _ = Describe("Dataplane NodeSet Test", func() {
6868
var dataplaneConfigHash string
6969
var dataplaneGlobalServiceName types.NamespacedName
7070
var dataplaneUpdateServiceName types.NamespacedName
71-
var newDataplaneUpdateServiceName types.NamespacedName
7271

7372
defaultEdpmServiceList := []string{
7473
"edpm_frr_image",
@@ -120,10 +119,6 @@ var _ = Describe("Dataplane NodeSet Test", func() {
120119
Namespace: namespace,
121120
}
122121
dataplaneUpdateServiceName = types.NamespacedName{
123-
Name: "update",
124-
Namespace: namespace,
125-
}
126-
newDataplaneUpdateServiceName = types.NamespacedName{
127122
Name: "update-services",
128123
Namespace: namespace,
129124
}
@@ -1278,63 +1273,15 @@ var _ = Describe("Dataplane NodeSet Test", func() {
12781273
})
12791274
})
12801275

1281-
When("A DataPlaneNodeSet is created with NoNodes and a MinorUpdate OpenStackDataPlaneDeployment is created", func() {
1282-
BeforeEach(func() {
1283-
1284-
dataplanev1.SetupDefaults()
1285-
updateServiceSpec := map[string]interface{}{
1286-
"playbook": "osp.edpm.update",
1287-
}
1288-
CreateDataPlaneServiceFromSpec(dataplaneUpdateServiceName, updateServiceSpec)
1289-
DeferCleanup(th.DeleteService, dataplaneUpdateServiceName)
1290-
DeferCleanup(th.DeleteInstance, CreateNetConfig(dataplaneNetConfigName, DefaultNetConfigSpec()))
1291-
DeferCleanup(th.DeleteInstance, CreateDNSMasq(dnsMasqName, DefaultDNSMasqSpec()))
1292-
DeferCleanup(th.DeleteInstance, CreateDataplaneNodeSet(dataplaneNodeSetName, DefaultDataPlaneNoNodeSetSpec(false)))
1293-
DeferCleanup(th.DeleteInstance, CreateDataplaneDeployment(dataplaneDeploymentName, MinorUpdateDataPlaneDeploymentSpec()))
1294-
openstackVersionName := types.NamespacedName{
1295-
Name: "openstackversion",
1296-
Namespace: namespace,
1297-
}
1298-
err := os.Setenv("OPENSTACK_RELEASE_VERSION", "0.0.1")
1299-
Expect(err).NotTo(HaveOccurred())
1300-
openstackv1.SetupVersionDefaults()
1301-
DeferCleanup(th.DeleteInstance, CreateOpenStackVersion(openstackVersionName))
1302-
1303-
CreateSSHSecret(dataplaneSSHSecretName)
1304-
CreateCABundleSecret(caBundleSecretName)
1305-
SimulateDNSMasqComplete(dnsMasqName)
1306-
SimulateIPSetComplete(dataplaneNodeName)
1307-
SimulateDNSDataComplete(dataplaneNodeSetName)
1308-
1309-
Eventually(func(g Gomega) {
1310-
// Make an AnsibleEE name for each service
1311-
ansibleeeName := types.NamespacedName{
1312-
Name: "update-edpm-deployment-edpm-compute-nodeset",
1313-
Namespace: namespace,
1314-
}
1315-
ansibleEE := GetAnsibleee(ansibleeeName)
1316-
ansibleEE.Status.Succeeded = 1
1317-
g.Expect(th.K8sClient.Status().Update(th.Ctx, ansibleEE)).To(Succeed())
1318-
}, th.Timeout, th.Interval).Should(Succeed())
1319-
1320-
})
1321-
It("NodeSet.Status.DeployedVersion should be set to latest version", Label("update"), func() {
1322-
Eventually(func() string {
1323-
dataplaneNodeSetInstance := GetDataplaneNodeSet(dataplaneNodeSetName)
1324-
return dataplaneNodeSetInstance.Status.DeployedVersion
1325-
}).Should(Equal("0.0.1"))
1326-
})
1327-
})
1328-
13291276
When("A DataPlaneNodeSet is created with NoNodes and a MinorUpdateServices OpenStackDataPlaneDeployment is created", func() {
13301277
BeforeEach(func() {
13311278

13321279
dataplanev1.SetupDefaults()
13331280
updateServiceSpec := map[string]interface{}{
13341281
"playbook": "osp.edpm.update_services",
13351282
}
1336-
CreateDataPlaneServiceFromSpec(newDataplaneUpdateServiceName, updateServiceSpec)
1337-
DeferCleanup(th.DeleteService, newDataplaneUpdateServiceName)
1283+
CreateDataPlaneServiceFromSpec(dataplaneUpdateServiceName, updateServiceSpec)
1284+
DeferCleanup(th.DeleteService, dataplaneUpdateServiceName)
13381285
DeferCleanup(th.DeleteInstance, CreateNetConfig(dataplaneNetConfigName, DefaultNetConfigSpec()))
13391286
DeferCleanup(th.DeleteInstance, CreateDNSMasq(dnsMasqName, DefaultDNSMasqSpec()))
13401287
DeferCleanup(th.DeleteInstance, CreateDataplaneNodeSet(dataplaneNodeSetName, DefaultDataPlaneNoNodeSetSpec(false)))

0 commit comments

Comments
 (0)