Skip to content

Commit b0480b1

Browse files
committed
Decrease number of machines in e2e tests
The e2e tests are currently very unstable. I suspect lack of resources in the devstack to be the issue. In an attempt to solve this, the number of control-plane nodes are reduced in this commit. Now only the multi-az test will use 3 CP. The rest will have 1 CP only. Signed-off-by: Lennart Jern <[email protected]>
1 parent 54d6fd0 commit b0480b1

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/e2e/suites/e2e/e2e_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
8585
shared.Logf("Creating a cluster")
8686
clusterName := fmt.Sprintf("cluster-%s", namespace.Name)
8787
configCluster := defaultConfigCluster(clusterName, namespace.Name)
88-
configCluster.ControlPlaneMachineCount = pointer.Int64(3)
88+
configCluster.ControlPlaneMachineCount = pointer.Int64(1)
8989
configCluster.WorkerMachineCount = pointer.Int64(1)
9090
configCluster.Flavor = shared.FlavorDefault
9191
createCluster(ctx, configCluster, clusterResources)
@@ -103,7 +103,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
103103
Namespace: namespace.Name,
104104
})
105105
Expect(workerMachines).To(HaveLen(1))
106-
Expect(controlPlaneMachines).To(HaveLen(3))
106+
Expect(controlPlaneMachines).To(HaveLen(1))
107107

108108
shared.Logf("Waiting for worker nodes to be in Running phase")
109109
statusChecks := []framework.MachineStatusCheck{framework.MachinePhaseCheck(string(clusterv1.MachinePhaseRunning))}
@@ -118,20 +118,20 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
118118

119119
waitForDaemonSetRunning(ctx, workloadCluster.GetClient(), "kube-system", "openstack-cloud-controller-manager")
120120

121-
waitForNodesReadyWithoutCCMTaint(ctx, workloadCluster.GetClient(), 4)
121+
waitForNodesReadyWithoutCCMTaint(ctx, workloadCluster.GetClient(), 2)
122122

123123
// Tag: clusterName is declared on OpenStackCluster and gets propagated to all machines
124124
// except the bastion host
125125
allServers, err := shared.DumpOpenStackServers(e2eCtx, servers.ListOpts{Tags: clusterName})
126126
Expect(err).NotTo(HaveOccurred())
127-
Expect(allServers).To(HaveLen(4))
127+
Expect(allServers).To(HaveLen(2))
128128

129129
// When listing servers with multiple tags, nova api requires a single, comma-separated string
130130
// with all the tags
131131
controlPlaneTags := fmt.Sprintf("%s,%s", clusterName, "control-plane")
132132
controlPlaneServers, err := shared.DumpOpenStackServers(e2eCtx, servers.ListOpts{Tags: controlPlaneTags})
133133
Expect(err).NotTo(HaveOccurred())
134-
Expect(controlPlaneServers).To(HaveLen(3))
134+
Expect(controlPlaneServers).To(HaveLen(1))
135135

136136
machineTags := fmt.Sprintf("%s,%s", clusterName, "machine")
137137
machineServers, err := shared.DumpOpenStackServers(e2eCtx, servers.ListOpts{Tags: machineTags})
@@ -164,7 +164,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
164164
shared.Logf("Creating a cluster")
165165
clusterName := fmt.Sprintf("cluster-%s", namespace.Name)
166166
configCluster := defaultConfigCluster(clusterName, namespace.Name)
167-
configCluster.ControlPlaneMachineCount = pointer.Int64(3)
167+
configCluster.ControlPlaneMachineCount = pointer.Int64(1)
168168
configCluster.WorkerMachineCount = pointer.Int64(1)
169169
configCluster.Flavor = shared.FlavorFlatcar
170170
createCluster(ctx, configCluster, clusterResources)
@@ -182,7 +182,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
182182
Namespace: namespace.Name,
183183
})
184184
Expect(workerMachines).To(HaveLen(1))
185-
Expect(controlPlaneMachines).To(HaveLen(3))
185+
Expect(controlPlaneMachines).To(HaveLen(1))
186186

187187
shared.Logf("Waiting for worker nodes to be in Running phase")
188188
statusChecks := []framework.MachineStatusCheck{framework.MachinePhaseCheck(string(clusterv1.MachinePhaseRunning))}
@@ -197,7 +197,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
197197

198198
waitForDaemonSetRunning(ctx, workloadCluster.GetClient(), "kube-system", "openstack-cloud-controller-manager")
199199

200-
waitForNodesReadyWithoutCCMTaint(ctx, workloadCluster.GetClient(), 4)
200+
waitForNodesReadyWithoutCCMTaint(ctx, workloadCluster.GetClient(), 2)
201201
})
202202
})
203203

@@ -209,7 +209,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
209209
shared.Logf("Creating a cluster")
210210
clusterName := fmt.Sprintf("cluster-%s", namespace.Name)
211211
configCluster := defaultConfigCluster(clusterName, namespace.Name)
212-
configCluster.ControlPlaneMachineCount = pointer.Int64(3)
212+
configCluster.ControlPlaneMachineCount = pointer.Int64(1)
213213
configCluster.WorkerMachineCount = pointer.Int64(1)
214214
configCluster.Flavor = shared.FlavorFlatcarSysext
215215
createCluster(ctx, configCluster, clusterResources)
@@ -227,7 +227,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
227227
Namespace: namespace.Name,
228228
})
229229
Expect(workerMachines).To(HaveLen(1))
230-
Expect(controlPlaneMachines).To(HaveLen(3))
230+
Expect(controlPlaneMachines).To(HaveLen(1))
231231

232232
shared.Logf("Waiting for worker nodes to be in Running phase")
233233
statusChecks := []framework.MachineStatusCheck{framework.MachinePhaseCheck(string(clusterv1.MachinePhaseRunning))}
@@ -242,7 +242,7 @@ var _ = Describe("e2e tests [PR-Blocking]", func() {
242242

243243
waitForDaemonSetRunning(ctx, workloadCluster.GetClient(), "kube-system", "openstack-cloud-controller-manager")
244244

245-
waitForNodesReadyWithoutCCMTaint(ctx, workloadCluster.GetClient(), 4)
245+
waitForNodesReadyWithoutCCMTaint(ctx, workloadCluster.GetClient(), 2)
246246
})
247247
})
248248

0 commit comments

Comments
 (0)