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

[SfpUtil] sfp eeprom with option dom is not working on Xcvrs with flat memory #19032

Closed
vivekrnv opened this issue May 21, 2024 · 4 comments · Fixed by sonic-net/sonic-utilities#3385
Assignees
Labels
Triaged this issue has been triaged

Comments

@vivekrnv
Copy link
Contributor

vivekrnv commented May 21, 2024

Description

Steps to reproduce the issue:

root@switch/home/admin# sfputil show eeprom -d -p Ethernet0
Traceback (most recent call last):
  File "/usr/local/bin/sfputil", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/sfputil/main.py", line 677, in eeprom
    xcvr_dom_info = platform_chassis.get_sfp(physical_port).get_transceiver_bulk_status()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/sonic_platform_base/sonic_xcvr/sfp_optoe_base.py", line 32, in get_transceiver_bulk_status
    return api.get_transceiver_bulk_status() if api is not None else None
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/sonic_platform_base/sonic_xcvr/api/public/cmis.py", line 233, in get_transceiver_bulk_status
    self.vdm_dict = self.get_vdm(self.vdm.VDM_REAL_VALUE)
                                 ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'VDM_REAL_VALUE'

get_transceiver_bulk_status call is failing

Describe the results you received:

Related to sonic-net/sonic-platform-common#397

Fixed a similar issue in xcvrd here: sonic-net/sonic-platform-daemons#458

But sfputil lacks any safeguards.

Also, no "TRANSCEIVER_DOM_INFO" table entries are seen on these sfp's

Describe the results you expected:

No Exception must be throws

Output of show version:

Latest master

@vivekrnv
Copy link
Contributor Author

@chiourung FYI

@gechiang
Copy link
Collaborator

@prgeor is this something expected? Flat memory is not supported? Can you help check with the original PR submitter @chiourung to see if this is something require changes in sfputil as well? Any other places may also need this?

@gechiang gechiang added the Triaged this issue has been triaged label May 22, 2024
@prgeor
Copy link
Contributor

prgeor commented May 23, 2024

@mihirpat1 can you address this

@vivekrnv
Copy link
Contributor Author

Note: Only seen on master, not on 202311

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaged this issue has been triaged
Projects
None yet
6 participants