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

[PFCWD] The incorrect cli command doesn't return failed exit code 1 #1690

Closed
Hedgehog-Guru opened this issue May 31, 2021 · 2 comments · Fixed by #1691
Closed

[PFCWD] The incorrect cli command doesn't return failed exit code 1 #1690

Hedgehog-Guru opened this issue May 31, 2021 · 2 comments · Fixed by #1691
Assignees

Comments

@Hedgehog-Guru
Copy link

Description
The incorrect cli PFCWD command doesn't return failed exit code 1

Steps to reproduce

  1. Run the cli command:
config pfcwd start --action drop ports all deteection-time 200 --restoration-time 200 ; echo AUTO_REMOTE_STATUS=$?

Observed behavior

root@r-qa-sw-eth-114:/home/admin# [sonic_dump_r-qa-sw-eth-2132_20210531_113146.tar.gz](https://github.com/Azure/sonic-buildimage/files/6569960/sonic_dump_r-qa-sw-eth-2132_20210531_113146.tar.gz)
Failed to run command, invalid options:
deteection-time



AUTO_REMOTE_STATUS=0

Expected behavior

root@r-qa-sw-eth-114:/home/admin# config pfcwd start --action drop ports all deteection-time 200 --restoration-time 200 ; echo AUTO_REMOTE_STATUS=$?
Failed to run command, invalid options:
deteection-time

AUTO_REMOTE_STATUS=1

Output of show version

SONiC Software Version: SONiC.202012.81-2fc748e_Internal
Distribution: Debian 10.9
Kernel: 4.19.0-12-2-amd64
Build commit: 2fc748ea
Build date: Thu May  6 20:42:29 UTC 2021
Built by: sw-r2d2-bot@r-build-sonic-ci02

Platform: x86_64-mlnx_msn3800-r0
HwSKU: ACS-MSN3800
ASIC: mellanox
ASIC Count: 1
Serial Number: MT1925X00004

sonic_dump_r-qa-sw-eth-2132_20210531_113146.tar.gz

@zhangyanzhao
Copy link
Collaborator

@lolyu please help to take a look. Thanks.

@dprital
Copy link
Collaborator

dprital commented Jun 14, 2021

@lolyu please help to take a look. Thanks.

Any update on that ? Thanks.

@neethajohn neethajohn transferred this issue from sonic-net/sonic-buildimage Jun 22, 2021
@neethajohn neethajohn self-assigned this Jun 22, 2021
neethajohn added a commit that referenced this issue Jun 25, 2021
Signed-off-by: Neetha John <[email protected]>

Fixes #1690

What I did
Set the correct return code when pfcwd command is specified with invalid options

How to verify it
Modified the unit test to check for the correct return code and ran them and they passed
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-utilities that referenced this issue Aug 10, 2021
Signed-off-by: Neetha John <[email protected]>

Fixes sonic-net#1690

What I did
Set the correct return code when pfcwd command is specified with invalid options

How to verify it
Modified the unit test to check for the correct return code and ran them and they passed
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 a pull request may close this issue.

4 participants