Skip to content

Commit 951633b

Browse files
keboliulguohan
authored andcommitted
[generate_dump]: fix a saidump file copy bug (sonic-net#248)
* "docker cp" command isn't applicable to tmpfs, need to use other ways to copy file from tmps signed-off-by [email protected]
1 parent 69baff7 commit 951633b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/generate_dump

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ main() {
290290
if [[ $platform == *"mlnx"* ]]; then
291291
local sai_dump_filename="/tmp/sai_sdk_dump_$(date +"%m_%d_%Y_%I_%M_%p")"
292292
docker exec -it syncd saisdkdump -f $sai_dump_filename
293-
docker cp syncd:$sai_dump_filename /tmp/
293+
docker exec syncd tar Ccf $(dirname $sai_dump_filename) - $(basename $sai_dump_filename) | tar Cxf /tmp/ -
294294
save_file $sai_dump_filename sai_sdk_dump true
295295
fi
296296

0 commit comments

Comments
 (0)