From 0d834c03144d65357d1c14a8698be794d767492a Mon Sep 17 00:00:00 2001 From: Tom Pantelis Date: Thu, 21 Nov 2024 15:38:51 -0500 Subject: [PATCH] Debug gateway Signed-off-by: Tom Pantelis --- .github/workflows/system.yml | 6 ++++++ scripts/dump_gw.sh | 14 ++++++++++++++ 2 files changed, 20 insertions(+) create mode 100755 scripts/dump_gw.sh diff --git a/.github/workflows/system.yml b/.github/workflows/system.yml index 6e44708ce..5439825a9 100644 --- a/.github/workflows/system.yml +++ b/.github/workflows/system.yml @@ -28,3 +28,9 @@ jobs: - name: Post mortem if: failure() uses: submariner-io/shipyard/gh-actions/post-mortem@release-0.19 + + - name: Dump gateway + if: failure() + shell: bash + run: | + scripts/dump_gw.sh diff --git a/scripts/dump_gw.sh b/scripts/dump_gw.sh new file mode 100755 index 000000000..8499be1fc --- /dev/null +++ b/scripts/dump_gw.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +export KUBECONFIG=$(find output/kubeconfigs -type f -printf %p: || :) +pod=$(kubectl --context=cluster1 get pods --selector="app=submariner-gateway" -n "submariner-operator" -o jsonpath='{.items[*].metadata.name}') +echo "GW Pod: "$pod +echo "::group::GW Pod info" +kubectl --context=cluster1 -n submariner-operator describe pods $pod +echo "::endgroup::" +echo "::group::GW Pod init log" +kubectl --context=cluster1 -n submariner-operator logs -c submariner-gateway-init $pod +echo "::endgroup::" +echo "::group::Prev GW Pod init log" +kubectl --context=cluster1 -n submariner-operator logs -p -c submariner-gateway-init $pod +echo "::endgroup::" \ No newline at end of file