-
Notifications
You must be signed in to change notification settings - Fork 684
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] fix bash errors in generate_dump script #1844
Conversation
Signed-off-by: Ying Xie <ying.xie@microsoft.com>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -195,8 +195,9 @@ save_cmd() { | |||
if $NOOP; then | |||
echo "${timeout_cmd} $cmd $redirect '$filepath'" | |||
else | |||
eval "${timeout_cmd} $cmd" "$redirect" "$filepath" | |||
if [ $? -ne 0 ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code looks good to me. Wondering where does it fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I see, it can fail when there's timeout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't look deep into it. One possibility is that command timed out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you were asking what the issue with this old structure. if line 198 returns non-zero code, then it would trigger the error handling and bypass the handling at 199.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@qiluo-msft you are right, there are more issues in the script that didn't get caught by test but code structure also needs to be updated. This PR by itself fixes the test issue. I'll add another PR to address more code structural issues. |
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>
…#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>
…#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>
* 41dfaad 2021-08-02 | Bridge mac setting, fix statedb time format (sonic-net#1844) (HEAD, origin/202012) [Prince Sunny] Signed-off-by: Guohan Lu <lguohan@gmail.com>
0b5f90b (HEAD -> 202012, origin/202012) [show techsupport] fix bash errors in generate_dump script (sonic-net#1844) 388c50c [202012][warmboot] Add new preboot health check: verify db integrity (sonic-net#1839) d73dc98 [config] support for configuring muxcable to standby mode of operation (sonic-net#1837) Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
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