Skip to content

Commit

Permalink
[generate dump]Added error message when saisdkdump fails (#2356)
Browse files Browse the repository at this point in the history
- What I did
Added error message when saisdkdump fails and cont to gather the rest. This is done to provide more readable information to the user when it cannot be avaialble (syncd for example is not running, during restart, etc).

- How I did it
Checked error code and print log

- How to verify it
Simulate saisdkdump error and verify the console output.
  • Loading branch information
dgsudharsan authored and yxieca committed Sep 8, 2022
1 parent c5b0a6d commit 7de9305
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/generate_dump
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,10 @@ collect_mellanox() {
${CMD_PREFIX}docker exec syncd mkdir -p $sai_dump_folder
${CMD_PREFIX}docker exec syncd saisdkdump -f $sai_dump_filename

if [ $? != 0 ]; then
echo "Failed to collect saisdkdump."
fi

copy_from_docker syncd $sai_dump_folder $sai_dump_folder
echo "$sai_dump_folder"
for file in `ls $sai_dump_folder`; do
Expand Down

0 comments on commit 7de9305

Please sign in to comment.