From 295b20fc7752c246fb0a31d0770b8cd29f021314 Mon Sep 17 00:00:00 2001 From: justinsb Date: Sun, 10 Nov 2024 17:52:03 -0500 Subject: [PATCH] tests: run kops toolbox dump in bare-metal e2e This lets us share the diagnostic-dumping code. We don't want to recreate the dumping apparatus --- tests/e2e/scenarios/bare-metal/dump-artifacts | 4 ++++ tests/e2e/scenarios/bare-metal/run-test | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/e2e/scenarios/bare-metal/dump-artifacts b/tests/e2e/scenarios/bare-metal/dump-artifacts index 77ec77ebb3f7a..cdd867b9f7f54 100755 --- a/tests/e2e/scenarios/bare-metal/dump-artifacts +++ b/tests/e2e/scenarios/bare-metal/dump-artifacts @@ -65,3 +65,7 @@ for ns in kube-system; do kubectl logs -n ${ns} ${pod} > ${ARTIFACTS}/logs/${ns}/${pod}.log || true done done + +# Use `kops toolbox dump` to dump a lot of useful information +mkdir -p ${ARTIFACTS}/dump +${KOPS} toolbox dump --dir ${ARTIFACTS}/dump --k8s-resources --private-key ${REPO_ROOT}/.build/.ssh/id_ed25519 --ssh-user root diff --git a/tests/e2e/scenarios/bare-metal/run-test b/tests/e2e/scenarios/bare-metal/run-test index c3da8254703aa..a013ce55e0388 100755 --- a/tests/e2e/scenarios/bare-metal/run-test +++ b/tests/e2e/scenarios/bare-metal/run-test @@ -28,7 +28,7 @@ BINDIR=${WORKDIR}/bin mkdir -p "${BINDIR}" go build -o ${BINDIR}/kops ./cmd/kops -KOPS=${BINDIR}/kops +export KOPS=${BINDIR}/kops function cleanup() { echo "running dump-artifacts"