Skip to content

scripts/generate_dump: Fix duplicate generate_dump entry#4300

Open
yxu-lumentum wants to merge 1 commit intosonic-net:masterfrom
yxu-lumentum:dump_script_bugfix
Open

scripts/generate_dump: Fix duplicate generate_dump entry#4300
yxu-lumentum wants to merge 1 commit intosonic-net:masterfrom
yxu-lumentum:dump_script_bugfix

Conversation

@yxu-lumentum
Copy link

@yxu-lumentum yxu-lumentum commented Feb 23, 2026

fixes #4292

What I did

The generate_dump script creates a symlink to itself in the dump directory before generating the initial tar archive. However, due to a typo in the cleanup step, the symlink was not correctly removed. As a result, when the dump directory was appended later using save_to_tar, the generate_dump entry was added a second time.

This patch corrects the cleanup target so that generate_dump symlink is properly removed, preventing duplicate.

How I did it

Updated the cleanup step in generate_dump:
From:
$RM $V -f $TARDIR/sonic_dump
To:
$RM $V -f $TARDIR/generate_dump

How to verify it

  1. Run show techsupport on a SONiC target device.
  2. Inspect the resulting tar archive in the path /var/dump. It should look like sonic_dump_sonic_20260116_001237.tar.gz.
  3. Confirm that the dump directory should only contain a single generate_dump.

Signed-off-by: Yi Xu Yi.Xu@lumentum.com

@mssonicbld
Copy link
Collaborator

/azp run

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 23, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: yxu-lumentum / name: Yi Xu (6047a18)

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

* Replace incorrect removal of 'sonic_dump' with 'generate_dump'

Signed-off-by: Yi Xu Yi.Xu@lumentum.com
Signed-off-by: Yi Xu <Yi.Xu@lumentum.com>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

tar file created by generate_dump contains generate_dump twice

2 participants