Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[techsupport] Removed -t option and other missing fixes for techsupport error reporting #1884

Merged
merged 3 commits into from
Nov 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions scripts/generate_dump
Original file line number Diff line number Diff line change
Expand Up @@ -685,11 +685,11 @@ save_redis() {
save_saidump() {
trap 'handle_error $? $LINENO' ERR
if [[ ( "$NUM_ASICS" == 1 ) ]] ; then
save_cmd "docker exec -t syncd saidump" "saidump"
save_cmd "docker exec syncd saidump" "saidump"
else
for (( i=0; i<$NUM_ASICS; i++ ))
do
save_cmd "docker exec -t syncd$i saidump" "saidump$i"
save_cmd "docker exec syncd$i saidump" "saidump$i"
done
fi
}
Expand Down Expand Up @@ -830,8 +830,8 @@ collect_mellanox() {
local sai_dump_folder="/tmp/saisdkdump"
local sai_dump_filename="${sai_dump_folder}/sai_sdk_dump_$(date +"%m_%d_%Y_%I_%M_%p")"

${CMD_PREFIX}docker exec -t syncd mkdir -p $sai_dump_folder
${CMD_PREFIX}docker exec -t syncd saisdkdump -f $sai_dump_filename
${CMD_PREFIX}docker exec syncd mkdir -p $sai_dump_folder
${CMD_PREFIX}docker exec syncd saisdkdump -f $sai_dump_filename

copy_from_docker syncd $sai_dump_folder $sai_dump_folder
echo "$sai_dump_folder"
Expand All @@ -840,7 +840,7 @@ collect_mellanox() {
done

${CMD_PREFIX}rm -rf $sai_dump_folder
${CMD_PREFIX}docker exec -t syncd rm -rf $sai_dump_folder
${CMD_PREFIX}docker exec syncd rm -rf $sai_dump_folder

# 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`
Expand Down Expand Up @@ -1217,12 +1217,12 @@ main() {
if [[ ( "$NUM_ASICS" > 1 ) ]]; then
for (( i=0; i<$NUM_ASICS; i++ ))
do
save_cmd "docker exec -t lldp$i lldpcli show statistics" "lldp$i.statistics"
save_cmd "docker exec lldp$i lldpcli show statistics" "lldp$i.statistics"
save_cmd "docker logs bgp$i" "docker.bgp$i.log"
save_cmd "docker logs swss$i" "docker.swss$i.log"
done
else
save_cmd "docker exec -t lldp lldpcli show statistics" "lldp.statistics"
save_cmd "docker exec lldp lldpcli show statistics" "lldp.statistics"
save_cmd "docker logs bgp" "docker.bgp.log"
save_cmd "docker logs swss" "docker.swss.log"
fi
Expand Down Expand Up @@ -1339,7 +1339,11 @@ main() {
fi

echo ${TARFILE}
exit $RETURN_CODE

if ! $SAVE_STDERR
then
exit $RETURN_CODE
fi
}

###############################################################################
Expand Down