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

[202205] [generate_dump] Revert "[202205] Revert the show-techsupport optimization PR's" and fix the empty /dump folder #2593

Conversation

vadymhlushko-mlnx
Copy link
Contributor

@vadymhlushko-mlnx vadymhlushko-mlnx commented Jan 11, 2023

What I did

Revert of the Revert " [202205] Revert the show-techsupport optimization PR's
Also, a fix for the degradation - an empty /var/dump/sonic_dump..../dump folder produced by the show_techsupport script.

How I did it

Delete the line of the code which removes all generated data: commit

1577    $RM $V -rf $TARDIR
1578    $MKDIR $V -p $TARDIR
1579    $MKDIR $V -p $LOGDIR

How to verify it

  1. Take an image with the original generate_dump script (with no optimization)
  2. Run on the switch show techsupport command and take the output archive from /var/dump/sonic_dump...tar.gz
  3. Take and image with this PR included (with generate_dump optimization)
  4. Run on the switch show techsupport command and take the output archive from /var/dump/sonic_dump...tar.gz
  5. Compare archives from step 2 and step 4 by using Linux tool ncdu

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

@vadymhlushko-mlnx vadymhlushko-mlnx changed the title [202205] [generate_dump] Revert back show_techsupport script optimization and fix the empty /dump folder [202205] [generate_dump] Revert "[202205] Revert the show-techsupport optimization PR's" and fix the empty /dump folder Jan 11, 2023
@@ -974,11 +980,6 @@ save_symlink() {
${CMD_PREFIX}ln -s ../$src_dir/$file_basename $file_basename
${CMD_PREFIX}popd

if $do_tar_append; then
($TAR $V -rf $TARFILE -C $DUMPDIR "$tar_path" \
Copy link
Collaborator

@dgsudharsan dgsudharsan Jan 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change creates symlinks and avoids duplicate copy inside the tar. The final tar option has "-h" which will undo this change. Can we overcome this?

Signed-off-by: Vadym Hlushko <vadymh@nvidia.com>
@vadymhlushko-mlnx vadymhlushko-mlnx force-pushed the 202205-generate-dump-empty-folder-fix branch from ca5a6bc to b38c7d7 Compare January 12, 2023 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants