diff --git a/kubernetes/kubectl_pods_dump_all.sh b/kubernetes/kubectl_pods_dump_all.sh index 65b112682a4..c68bc4e5361 100755 --- a/kubernetes/kubectl_pods_dump_all.sh +++ b/kubernetes/kubectl_pods_dump_all.sh @@ -64,6 +64,15 @@ if ! [ "$interval_seconds" -gt 0 ]; then die "Second arg - interval_seconds - must be an integer greater than zero!" fi +# canonicalize to full path so we can find it from a new support-bundle dir +jdk="$(readlink -f "$jdk")" + +support_bundle_dir="support-bundle-$(date '+%F_%H%M')" + +mkdir -p -v "$support_bundle_dir" + +cd "$support_bundle_dir" + if [ -n "$jdk" ]; then if ! [ -f "$jdk/bin/jstack" ]; then die "Fifth arg - jdk - must be a directory containing a JDK with jstack!"