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

SONiC AS5712 : "show interface status <INTERFACENAME>" is throwing error. #427

Closed
Priya-NS opened this issue Jan 7, 2019 · 2 comments
Closed

Comments

@Priya-NS
Copy link

Priya-NS commented Jan 7, 2019

SYMPTOM

SONiC AS5712 : "show interface status " is throwing error.

TOPOLOGY

AS5712 DUT

STEPS TO REPRODUCE

  1. Bring Up the DUT with default configuration and with the latest build SONiC.201811.0-38d0051
  2. Execute the command "show interface status " in AS5712. Observe that it is throwing error.

root@SONIC:~# show interfaces status Ethernet39
Traceback (most recent call last):
File "/usr/bin/intfutil", line 204, in
main(sys.argv[1:])
File "/usr/bin/intfutil", line 197, in main
interface_stat = IntfStatus(intf_name)
File "/usr/bin/intfutil", line 129, in init
appl_db_keys = appl_db_keys_get(self.appl_db, intf_name)
File "/usr/bin/intfutil", line 41, in appl_db_keys_get
appl_db_keys = db.keys(appl_db.APPL_DB, "PORT_TABLE:%s" % intf_name)
NameError: global name 'db' is not defined

EXPECTED BEHAVIOR:

  1. As per the Help text, the command should work.
    root@SONIC:~# show interfaces status flejwlfj kjflew
    Usage: show interfaces status [OPTIONS] [INTERFACENAME]

Error: Got unexpected extra argument (kjflew)
2. The same command is working in other SONiC DUT of AG9032v1.
root@sonic:# show platform summary
Platform: x86_64-delta_ag9032v1-r0
HwSKU: Delta-ag9032v1
ASIC: broadcom
root@sonic:
# show interfaces status Ethernet4
Interface Lanes Speed MTU Alias Oper Admin


Ethernet4 45,46,47,48 N/A 9100 hundredGigE1/2 down up

REPRODUCIBILITY

3 out of 3

BUILD SIGNATURE

root@SONIC:/home/admin# show version
SONiC Software Version: SONiC.201811.0-38d0051
Distribution: Debian 9.6
Kernel: 4.9.0-8-amd64
Build commit: 38d0051
Build date: Tue Jan 1 07:09:13 UTC 2019
Built by: vmuser@server1

@kirankella
Copy link
Contributor

It needs a bug fix in intfutil script in the function app_db_keys_get() function when getting the keys for a specific interface.
I am submitting Pull Request for this shortly.

@kirankella
Copy link
Contributor

Changes to fix this issue are made as part of #424

@lguohan lguohan closed this as completed in 72b7069 Mar 7, 2019
yxieca pushed a commit that referenced this issue Mar 19, 2019
* sonic-utilities: Bug fix while showing interface status for a specific interface.

* While getting the keys from port table for a specific interface, wrong db is passed, fixed the bug

Signed-off-by: kiran.kella@broadcom.com
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

No branches or pull requests

2 participants