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

show techsupport fail when /usr/core folder not existing #8850

Closed
yxieca opened this issue Sep 28, 2021 · 6 comments · Fixed by sonic-net/sonic-utilities#1844
Closed

show techsupport fail when /usr/core folder not existing #8850

yxieca opened this issue Sep 28, 2021 · 6 comments · Fixed by sonic-net/sonic-utilities#1844

Comments

@yxieca
Copy link
Contributor

yxieca commented Sep 28, 2021

Description

show techsupport fails on any platform not provided /usr/bin/hw-management-generate-dump.sh

Steps to reproduce the issue:

  1. run "show techsupport" on platform didn't provide /usr/bin/hw-management-generate-dump.sh

Describe the results you received:

See log below

Describe the results you expected:

show techsupport should succeed.

Output of show version:

SONiC Software Version: SONiC.20201231.32
Distribution: Debian 10.10
Kernel: 4.19.0-12-2-armmp
Build commit: d740d6ae05
Build date: Sun Sep 26 15:19:58 UTC 2021
Built by: AzDevOps@sonic-agent-arm64-02

Platform: armhf-nokia_ixs7215_52x-r0
HwSKU: Nokia-7215
ASIC: marvell
ASIC Count: 1
Serial Number: NK205210084
Uptime: 01:27:46 up  4:08,  1 user,  load average: 0.12, 0.23, 0.26

Output of show techsupport:

removed directory '/var/dump/sonic_dump_str2-7215-acs-1_20210927_230453/warmboot/teamd'
removed directory '/var/dump/sonic_dump_str2-7215-acs-1_20210927_230453/warmboot'
removed directory '/var/dump/sonic_dump_str2-7215-acs-1_20210927_230453'
handle_error $? $LINENO
ERR: RC:-1 observed on line 1224
HW Mgmt dump script /usr/bin/hw-management-generate-dump.sh does not exist
mkdir: created directory '/var/dump/sonic_dump_str2-7215-acs-1_20210927_230453'
mkdir: created directory '/var/dump/sonic_dump_str2-7215-acs-1_20210927_230453/log'
sonic_dump_str2-7215-acs-1_20210927_230453/log/techsupport_time_info.mdpRPlzew5
removed '/var/dump/sonic_dump_str2-7215-acs-1_20210927_230453/log/techsupport_time_info.mdpRPlzew5'
removed directory '/var/dump/sonic_dump_str2-7215-acs-1_20210927_230453/log'
removed directory '/var/dump/sonic_dump_str2-7215-acs-1_20210927_230453'
/var/dump/sonic_dump_str2-7215-acs-1_20210927_230453.tar: 90.6% -- replaced with /var/dump/sonic_dump_str2-7215-acs-1_20210927_230453.tar.gz
/var/dump/sonic_dump_str2-7215-acs-1_20210927_230453.tar.gz

real 2m7.188s
user 1m2.188s
sys 0m15.576s
admin@str2-7215-acs-1:~$ echo $?
1

Additional information you deem important (e.g. issue happens only occasionally):

@Blueve
Copy link
Contributor

Blueve commented Sep 28, 2021

https://github.com/Azure/sonic-utilities/blob/826311cd366825c332a27799e1044509aa3d530e/scripts/generate_dump#L1277

The scripts shouldn't fail even hw-management-generate-dump.sh doesn't exists.

From the log ERR: RC:-1 observed on line 1224 seems like the the issue were happens here:

https://github.com/Azure/sonic-utilities/blob/826311cd366825c332a27799e1044509aa3d530e/scripts/generate_dump#L1224

@yxieca
Copy link
Contributor Author

yxieca commented Sep 28, 2021

https://github.com/Azure/sonic-utilities/blob/826311cd366825c332a27799e1044509aa3d530e/scripts/generate_dump#L1277

The scripts shouldn't fail even hw-management-generate-dump.sh doesn't exists.

From the log ERR: RC:-1 observed on line 1224 seems like the the issue were happens here:

https://github.com/Azure/sonic-utilities/blob/826311cd366825c332a27799e1044509aa3d530e/scripts/generate_dump#L1224

You are right. I was just coming to this realization too.

@yxieca yxieca changed the title show techsupport fail due to /usr/bin/hw-management-generate-dump.sh not available show techsupport fail when /usr/core folder not existing Sep 28, 2021
@yxieca
Copy link
Contributor Author

yxieca commented Sep 28, 2021

The problem was introduced by this PR: sonic-net/sonic-utilities#1833, when /var/core doesn't exist, the script will fail.

@yxieca
Copy link
Contributor Author

yxieca commented Sep 28, 2021

sonic-net/sonic-utilities#1723 for master

@yxieca
Copy link
Contributor Author

yxieca commented Sep 28, 2021

sonic-net/sonic-utilities#1843 pending merge for 202006.

@yxieca
Copy link
Contributor Author

yxieca commented Sep 28, 2021

Above 3 PRs introduced error at line 1224 and line 196

yxieca added a commit to sonic-net/sonic-utilities that referenced this issue Sep 28, 2021
What I did
Fix: sonic-net/sonic-buildimage#8850

Issue was introduced by #1723, #1833, and #1843 (pending merge)

The error_handler is a great idea but the bash script needs to be error free first.

How I did it
Fix bash script errors.

How to verify it
run show techsupport test..

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
qiluo-msft pushed a commit to sonic-net/sonic-utilities that referenced this issue Sep 29, 2021
What I did
Fix: sonic-net/sonic-buildimage#8850

Issue was introduced by #1723, #1833, and #1843 (pending merge)

The error_handler is a great idea but the bash script needs to be error free first.

How I did it
Fix bash script errors.

How to verify it
run show techsupport test..

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
vivekrnv pushed a commit to vivekrnv/sonic-utilities that referenced this issue Oct 16, 2021
…#1844)

What I did
Fix: sonic-net/sonic-buildimage#8850

Issue was introduced by sonic-net#1723, sonic-net#1833, and sonic-net#1843 (pending merge)

The error_handler is a great idea but the bash script needs to be error free first.

How I did it
Fix bash script errors.

How to verify it
run show techsupport test..

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
yxieca pushed a commit to sonic-net/sonic-utilities that referenced this issue Oct 25, 2021
…oved Error Reporting (#1843)

What I did
Fix: sonic-net/sonic-buildimage#8850

Issue was introduced by #1723, #1833, and #1843 (pending merge)

The error_handler is a great idea but the bash script needs to be error free first.

How I did it
Fix bash script errors.

How to verify it
run show techsupport test..

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
praveen-li pushed a commit to praveen-li/sonic-utilities that referenced this issue Feb 8, 2022
…#1844)

What I did
Fix: sonic-net/sonic-buildimage#8850

Issue was introduced by sonic-net#1723, sonic-net#1833, and sonic-net#1843 (pending merge)

The error_handler is a great idea but the bash script needs to be error free first.

How I did it
Fix bash script errors.

How to verify it
run show techsupport test..

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this issue Aug 3, 2023
What I did
Fix: sonic-net/sonic-buildimage#8850

Issue was introduced by #1723, #1833, and #1843 (pending merge)

The error_handler is a great idea but the bash script needs to be error free first.

How I did it
Fix bash script errors.

How to verify it
run show techsupport test..

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants