From 7a82c0691c9f95cb6faabdce14256a8042b00d7c Mon Sep 17 00:00:00 2001 From: DavidZagury <32644413+DavidZagury@users.noreply.github.com> Date: Sun, 27 Jun 2021 10:02:36 +0300 Subject: [PATCH] [Mellanox] Update mellanox dump generation to include SDK dumps (#1640) - What I did Add Mellanox SDK dump output into techsupport in the generate_dump script. - How I did it Add a step to copy SDK dump output into techsupport in the Mellanox step in generate_dump script. - How to verify it Simulate SDK event on a Mellanox switch and check that dump has been added copied into the techsupport results. --- scripts/generate_dump | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/generate_dump b/scripts/generate_dump index e38b0834f8..082b8dee5c 100755 --- a/scripts/generate_dump +++ b/scripts/generate_dump @@ -779,6 +779,16 @@ collect_mellanox() { ${CMD_PREFIX}/usr/bin/mstdump /dev/mst/mt*conf0 > "${mst_dump_filename}${i}" save_file "${mst_dump_filename}${i}" mstdump true done + + # Save SDK error dumps + local sdk_dump_path=`${CMD_PREFIX}docker exec syncd cat /tmp/sai.profile|grep "SAI_DUMP_STORE_PATH"|cut -d = -f2` + if [[ $sdk_dump_path ]]; then + copy_from_docker syncd $sdk_dump_path /tmp/sdk-dumps + for file in $(find /tmp/sdk-dumps); do + save_file ${file} sai_sdk_dump false + done + rm -rf /tmp/sdk-dumps + fi } ###############################################################################