Skip to content

Commit 18560c9

Browse files
authored
cleanup.sh: wait for provier-networks to be deleted before deleting kube-ovn-cni (#3006)
1 parent 9304ae5 commit 18560c9

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

.github/workflows/build-x86-image.yaml

+9-12
Original file line numberDiff line numberDiff line change
@@ -968,10 +968,7 @@ jobs:
968968
done
969969
970970
- name: Cleanup
971-
run: |
972-
if [ "${{ matrix.mode }}" != underlay ]; then
973-
sh -x dist/images/cleanup.sh
974-
fi
971+
run: sh -x dist/images/cleanup.sh
975972

976973
kube-ovn-ic-conformance-e2e:
977974
name: Kube-OVN IC Conformance E2E
@@ -1108,7 +1105,7 @@ jobs:
11081105
run: make kind-install-chart
11091106

11101107
- name: Cleanup
1111-
run: sh dist/images/cleanup.sh
1108+
run: sh -x dist/images/cleanup.sh
11121109

11131110
underlay-logical-gateway-installation-test:
11141111
name: Underlay Logical Gateway Installation Test
@@ -1144,7 +1141,7 @@ jobs:
11441141
run: make kind-install-underlay-logical-gateway-dual
11451142

11461143
- name: Cleanup
1147-
run: sh dist/images/cleanup.sh
1144+
run: sh -x dist/images/cleanup.sh
11481145

11491146
no-ovn-lb-test:
11501147
name: Disable OVN LB Test
@@ -1182,7 +1179,7 @@ jobs:
11821179
run: make kind-install
11831180

11841181
- name: Cleanup
1185-
run: sh dist/images/cleanup.sh
1182+
run: sh -x dist/images/cleanup.sh
11861183

11871184
no-np-test:
11881185
name: Disable Network Policy Test
@@ -1220,7 +1217,7 @@ jobs:
12201217
run: make kind-install
12211218

12221219
- name: Cleanup
1223-
run: sh dist/images/cleanup.sh
1220+
run: sh -x dist/images/cleanup.sh
12241221

12251222
lb-svc-e2e:
12261223
name: LB Service E2E
@@ -1535,7 +1532,7 @@ jobs:
15351532
path: installation-compatibility-test-ko-log.tar.gz
15361533

15371534
- name: Cleanup
1538-
run: sh dist/images/cleanup.sh
1535+
run: sh -x dist/images/cleanup.sh
15391536

15401537
cilium-chaining-e2e:
15411538
name: Cilium Chaining E2E
@@ -1642,7 +1639,7 @@ jobs:
16421639
path: cilium-chaining-e2e-ko-log.tar.gz
16431640

16441641
- name: Cleanup
1645-
run: sh dist/images/cleanup.sh
1642+
run: sh -x dist/images/cleanup.sh
16461643

16471644
kube-ovn-security-e2e:
16481645
name: Kube-OVN Security E2E
@@ -1757,7 +1754,7 @@ jobs:
17571754
path: kube-ovn-security-e2e-${{ matrix.ssl }}-${{ matrix.bind-local }}-${{ matrix.ip-family }}-ko-log.tar.gz
17581755

17591756
- name: Cleanup
1760-
run: sh dist/images/cleanup.sh
1757+
run: sh -x dist/images/cleanup.sh
17611758

17621759
push:
17631760
name: Push Images
@@ -1930,7 +1927,7 @@ jobs:
19301927
path: kube-ovn-submariner-conformance-e2e-ko-log.tar.gz
19311928

19321929
- name: Cleanup
1933-
run: sh dist/images/cleanup.sh
1930+
run: sh -x dist/images/cleanup.sh
19341931

19351932
iptables-vpc-nat-gw-conformance-e2e:
19361933
name: Iptables VPC NAT Gateway E2E

dist/images/cleanup.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,12 @@ done
8181
kubectl delete --ignore-not-found deploy kube-ovn-monitor -n kube-system
8282
kubectl delete --ignore-not-found cm ovn-config ovn-ic-config ovn-external-gw-config -n kube-system
8383
kubectl delete --ignore-not-found svc kube-ovn-pinger kube-ovn-controller kube-ovn-cni kube-ovn-monitor -n kube-system
84-
kubectl delete --ignore-not-found ds kube-ovn-cni -n kube-system
8584
kubectl delete --ignore-not-found deploy kube-ovn-controller -n kube-system
8685

86+
# wait for provier-networks to be deleted before deleting kube-ovn-cni
87+
sleep 5
88+
kubectl delete --ignore-not-found ds kube-ovn-cni -n kube-system
89+
8790
# ensure kube-ovn-cni has been deleted
8891
while :; do
8992
if [ $(kubectl get pod --no-headers -n kube-system -l app=kube-ovn-cni | wc -l) -eq 0 ]; then

0 commit comments

Comments
 (0)