Skip to content

Commit 1fcddfa

Browse files
committed
Update IPsec CI lane configuration for IPsec tests
As per changes in openshift/origin#29437 for IPsec E2E tests, each IPsec mode Full and External must be tested separately, so this commit updates openshift-e2e-test step with new test type called ipsec-suite and ipsec test suite is executed under this test type for each ipsec modes. Signed-off-by: Periyasamy Palanisamy <[email protected]>
1 parent 78a6b09 commit 1fcddfa

9 files changed

+57
-8
lines changed

ci-operator/config/openshift/cluster-network-operator/openshift-cluster-network-operator-master.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ tests:
115115
env:
116116
EXTRA_MG_ARGS: --host-network
117117
workflow: openshift-e2e-aws-ovn-serial
118-
- always_run: false
118+
- always_run: true
119119
as: e2e-aws-ovn-ipsec-serial
120120
optional: true
121121
steps:

ci-operator/config/openshift/cluster-network-operator/openshift-cluster-network-operator-release-4.19.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ tests:
115115
env:
116116
EXTRA_MG_ARGS: --host-network
117117
workflow: openshift-e2e-aws-ovn-serial
118-
- always_run: false
118+
- always_run: true
119119
as: e2e-aws-ovn-ipsec-serial
120120
optional: true
121121
steps:

ci-operator/config/openshift/cluster-network-operator/openshift-cluster-network-operator-release-4.20.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ tests:
116116
env:
117117
EXTRA_MG_ARGS: --host-network
118118
workflow: openshift-e2e-aws-ovn-serial
119-
- always_run: false
119+
- always_run: true
120120
as: e2e-aws-ovn-ipsec-serial
121121
optional: true
122122
steps:

ci-operator/jobs/openshift/cluster-network-operator/openshift-cluster-network-operator-master-presubmits.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ presubmits:
426426
secretName: result-aggregator
427427
trigger: (?m)^/test( | .* )e2e-aws-ovn-hypershift-conformance,?($|\s.*)
428428
- agent: kubernetes
429-
always_run: false
429+
always_run: true
430430
branches:
431431
- ^master$
432432
- ^master-

ci-operator/jobs/openshift/cluster-network-operator/openshift-cluster-network-operator-release-4.19-presubmits.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ presubmits:
426426
secretName: result-aggregator
427427
trigger: (?m)^/test( | .* )e2e-aws-ovn-hypershift-conformance,?($|\s.*)
428428
- agent: kubernetes
429-
always_run: false
429+
always_run: true
430430
branches:
431431
- ^release-4\.19$
432432
- ^release-4\.19-

ci-operator/jobs/openshift/cluster-network-operator/openshift-cluster-network-operator-release-4.20-presubmits.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ presubmits:
146146
secretName: result-aggregator
147147
trigger: (?m)^/test( | .* )e2e-aws-ovn-hypershift-conformance,?($|\s.*)
148148
- agent: kubernetes
149-
always_run: false
149+
always_run: true
150150
branches:
151151
- ^release-4\.20$
152152
- ^release-4\.20-

ci-operator/step-registry/openshift/e2e/aws/ovn/ipsec-serial/openshift-e2e-aws-ovn-ipsec-serial-workflow.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ workflow:
1717
- chain: ipi-deprovision
1818
env:
1919
NMSTATE_OPERATOR_SUB_SOURCE: qe-app-registry
20-
TEST_SUITE: openshift/network/ipsec
21-
TEST_ARGS: --run \[sig-network\]\[Feature:IPsec\]
20+
TEST_TYPE: ipsec-suite
2221
documentation: |-
2322
The Openshift E2E AWS `ipsec serial` workflow executes the `openshift/network/ipsec` end-to-end
2423
IPsec test suite on AWS with the OVNKubernetes network plugin.

ci-operator/step-registry/openshift/e2e/test/openshift-e2e-test-commands.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,38 @@ function suite() {
331331
set +x
332332
}
333333

334+
function wait_for_ipsec_full_mode() {
335+
until
336+
timeout 30s oc rollout status daemonset/ovn-ipsec-host -n openshift-ovn-kubernetes && \
337+
oc wait --for=delete daemonset/ovn-ipsec-containerized -n openshift-ovn-kubernetes --timeout=30s;
338+
do
339+
echo "ovn-ipsec-host daemonset is not available yet (or) ovn-ipsec-containerized daemonset is still deployed"
340+
sleep 30s
341+
done
342+
wait_for_cluster_operators_ready
343+
}
344+
345+
function wait_for_ipsec_external_mode() {
346+
until
347+
oc wait --for=delete daemonset/ovn-ipsec-host -n openshift-ovn-kubernetes --timeout=30s;
348+
do
349+
echo "ovn-ipsec-host daemonset is not removed yet"
350+
sleep 30s
351+
done
352+
wait_for_cluster_operators_ready
353+
}
354+
355+
function wait_for_cluster_operators_ready() {
356+
until
357+
oc wait clusteroperators --all --for='condition=Available=True' --timeout=30s && \
358+
oc wait clusteroperators --all --for='condition=Progressing=False' --timeout=30s && \
359+
oc wait clusteroperators --all --for='condition=Degraded=False' --timeout=30s;
360+
do
361+
echo "Cluster Operators Degraded=True,Progressing=True,or Available=False"
362+
sleep 30s
363+
done
364+
}
365+
334366
echo "$(date +%s)" > "${SHARED_DIR}/TEST_TIME_TEST_START"
335367

336368
oc -n openshift-config patch cm admin-acks --patch '{"data":{"ack-4.8-kube-1.22-api-removals-in-4.9":"true"}}' --type=merge || echo 'failed to ack the 4.9 Kube v1beta1 removals; possibly API-server issue, or a pre-4.8 release image'
@@ -516,6 +548,21 @@ suite-conformance)
516548
suite)
517549
suite
518550
;;
551+
ipsec-suite)
552+
# Rollout IPsec Full mode and run the suite.
553+
echo "Rolling out IPsec Full mode"
554+
oc patch networks.operator.openshift.io cluster --type=merge -p='{"spec":{"defaultNetwork":{"ovnKubernetesConfig":{"ipsecConfig":{"mode":"Full"}}}}}'
555+
wait_for_ipsec_full_mode
556+
echo "IPsec Full mode rollout complete. running IPsec test suite now"
557+
TEST_SUITE=openshift/network/ipsec TEST_ARGS="--run \[sig-network\]\[Feature:IPsec\]" suite
558+
559+
# Rollout IPsec External mode and run the suite.
560+
echo "Rolling out IPsec External mode"
561+
oc patch networks.operator.openshift.io cluster --type=merge -p='{"spec":{"defaultNetwork":{"ovnKubernetesConfig":{"ipsecConfig":{"mode":"External"}}}}}'
562+
wait_for_ipsec_external_mode
563+
echo "IPsec External mode rollout complete. running IPsec test suite now"
564+
TEST_SUITE=openshift/network/ipsec TEST_ARGS="--run \[sig-network\]\[Feature:IPsec\]" suite
565+
;;
519566
*)
520567
echo >&2 "Unsupported test type '${TEST_TYPE}'"
521568
exit 1

ci-operator/step-registry/openshift/e2e/test/openshift-e2e-test-ref.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ ref:
3535
an upgrade completes or have explicit logic in their test to tolerate behavior after
3636
upgrade.
3737
* 'upgrade-paused' - Perform an upgrade to the images defined by OPENSHIFT_UPGRADE_RELEASE_IMAGE_OVERRIDE with paused worker pool.
38+
* 'ipsec-suite' - Runs IPsec test suite. The test suite is invoked separately for IPsec Full and External modes.
39+
1. Rollout IPsec Full mode, wait for it to complete and run the ipsec test suite.
40+
2. Change IPsec Full -> External mode, wait for rollout to complete, run the ipsec test suite.
3841
- name: TEST_SUITE
3942
default: openshift/conformance/parallel
4043
documentation: The test suite to run. Use 'openshift-test run --help' to list available suites.

0 commit comments

Comments
 (0)