Skip to content

Commit

Permalink
github: Collect cilium-sysdump in L4LB upon failure
Browse files Browse the repository at this point in the history
Signed-off-by: Martynas Pumputis <m@lambda.lt>
  • Loading branch information
brb committed Jul 28, 2021
1 parent 7cf2461 commit be5122f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/tests-l4lb-v1.10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,18 @@ jobs:
run: |
ssh default "sudo /bin/sh -c 'cd /vagrant/test/l4lb && ./test.sh ${{ github.repository_owner}} ${{ steps.vars.outputs.sha }}'"
- name: Fetch cilium-sysdump
if: ${{ failure() }}
run: |
scp default:/tmp/cilium-sysdump-out.zip .
- name: Upload cilium-sysdump
uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074
if: ${{ failure() }}
with:
name: cilium-sysdump-out.zip
path: cilium-sysdump-out.zip

- name: Set commit status to success
if: ${{ success() }}
uses: Sibz/github-status-action@67af1f4042a5a790681aad83c44008ca6cfab83d
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/tests-l4lb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,18 @@ jobs:
run: |
ssh default "sudo /bin/sh -c 'cd /vagrant/test/l4lb && ./test.sh ${{ github.repository_owner}} ${{ steps.vars.outputs.sha }}'"
- name: Fetch cilium-sysdump
if: ${{ failure() }}
run: |
scp default:/tmp/cilium-sysdump-out.zip .
- name: Upload cilium-sysdump
uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074
if: ${{ failure() }}
with:
name: cilium-sysdump-out.zip
path: cilium-sysdump-out.zip

- name: Set commit status to success
if: ${{ success() }}
uses: Sibz/github-status-action@67af1f4042a5a790681aad83c44008ca6cfab83d
Expand Down
7 changes: 7 additions & 0 deletions test/l4lb/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ WORKER_IP=$(docker exec kind-worker ip -o -4 a s eth0 | awk '{print $4}' | cut -
nsenter -t $(docker inspect kind-worker -f '{{ .State.Pid }}') -n /bin/sh -c \
'tc qdisc add dev eth0 clsact && tc filter add dev eth0 ingress bpf direct-action object-file ./test_tc_tunnel.o section decap'

collect_sysdump() {
curl -sLO https://github.com/cilium/cilium-sysdump/releases/latest/download/cilium-sysdump.zip
python cilium-sysdump.zip --output /tmp/cilium-sysdump-out
}

trap collect_sysdump ERR

CILIUM_POD_NAME=$(kubectl -n kube-system get pod -l k8s-app=cilium -o=jsonpath='{.items[0].metadata.name}')
kubectl -n kube-system wait --for=condition=Ready pod "$CILIUM_POD_NAME" --timeout=5m

Expand Down

0 comments on commit be5122f

Please sign in to comment.