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