Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian committed Dec 31, 2024
1 parent d86baa6 commit bb7ef9e
Showing 1 changed file with 12 additions and 77 deletions.
89 changes: 12 additions & 77 deletions .github/workflows/build-x86-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,25 @@ jobs:
- build-kube-ovn
- build-e2e-binaries
runs-on: ubuntu-24.04
timeout-minutes: 10
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
ip-family:
- ipv4
- ipv6
- dual
index:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
steps:
- uses: jlumbroso/[email protected]
with:
Expand Down Expand Up @@ -342,79 +353,3 @@ jobs:
E2E_BRANCH: ${{ github.base_ref || github.ref_name }}
E2E_IP_FAMILY: ${{ matrix.ip-family }}
run: make vpc-egress-gateway-e2e

- name: Collect k8s events
if: failure() && steps.e2e.conclusion == 'failure'
run: |
kubectl get events -A -o yaml > vpc-egress-gateway-e2e-${{ matrix.ip-family }}-events.yaml
tar zcf vpc-egress-gateway-e2e-${{ matrix.ip-family }}-events.tar.gz vpc-egress-gateway-e2e-${{ matrix.ip-family }}-events.yaml
- name: Upload k8s events
uses: actions/upload-artifact@v4
if: failure() && steps.e2e.conclusion == 'failure'
with:
name: vpc-egress-gateway-e2e-${{ matrix.ip-family }}-events
path: vpc-egress-gateway-e2e-${{ matrix.ip-family }}-events.tar.gz

- name: Collect apiserver audit logs
if: failure() && steps.e2e.conclusion == 'failure'
run: |
docker cp kube-ovn-control-plane:/var/log/kubernetes/kube-apiserver-audit.log .
tar zcf vpc-egress-gateway-e2e-${{ matrix.ip-family }}-audit-log.tar.gz kube-apiserver-audit.log
- name: Upload apiserver audit logs
uses: actions/upload-artifact@v4
if: failure() && steps.e2e.conclusion == 'failure'
with:
name: vpc-egress-gateway-e2e-${{ matrix.ip-family }}-audit-log
path: vpc-egress-gateway-e2e-${{ matrix.ip-family }}-audit-log.tar.gz

- name: kubectl ko log
if: failure() && steps.e2e.conclusion == 'failure'
run: |
make kubectl-ko-log
mv kubectl-ko-log.tar.gz vpc-egress-gateway-e2e-${{ matrix.ip-family }}-ko-log.tar.gz
- name: upload kubectl ko log
uses: actions/upload-artifact@v4
if: failure() && steps.e2e.conclusion == 'failure'
with:
name: vpc-egress-gateway-e2e-${{ matrix.ip-family }}-ko-log
path: vpc-egress-gateway-e2e-${{ matrix.ip-family }}-ko-log.tar.gz

- name: Check kube ovn pod restarts
if: ${{ success() || (failure() && (steps.install.conclusion == 'failure' || steps.e2e.conclusion == 'failure')) }}
run: make check-kube-ovn-pod-restarts

- name: Check valgrind result
run: |
kubectl -n kube-system rollout restart ds ovs-ovn
kubectl -n kube-system rollout status ds ovs-ovn
sleep 10
kubectl -n kube-system rollout restart deploy ovn-central
kubectl -n kube-system rollout status deploy ovn-central
while true; do
if [ $(kubectl -n kube-system get pod -l app=ovs -o name | wc -l) -eq $(kubectl get node -o name | wc -l) ]; then
break
fi
sleep 1
done
kubectl ko log ovn
kubectl ko log ovs
for daemon in ovsdb-nb ovsdb-sb ovn-northd ovn-controller ovsdb-server ovs-vswitchd; do
echo "Checking if valgrind log file for $daemon exists..."
find kubectl-ko-log -type f -name "$daemon.valgrind.log.[[:digit:]]*" -exec false {} + && exit 1
done
find kubectl-ko-log -type f -name '*.valgrind.log.*' | while read f; do
if grep -qw 'definitely lost' "$f"; then
echo "Memory leak detected in $(basename $f | awk -F. '{print $1}')."
echo $f
cat "$f"
exit 1
fi;
done
- name: Cleanup
run: timeout -k 10 180 sh -x dist/images/cleanup.sh

0 comments on commit bb7ef9e

Please sign in to comment.