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

sfputilbase.py: fix the Python crash upon IO failures #5

Merged
merged 1 commit into from
Nov 18, 2020
Merged

sfputilbase.py: fix the Python crash upon IO failures #5

merged 1 commit into from
Nov 18, 2020

Commits on Nov 18, 2020

  1. sfputilbase.py: fix the Python crash upon IO failures

    This fixes the following failure:
    
    Nov 18 00:57:55.488171 sonic INFO pmon#supervisord: xcvrd Traceback (most recent call last):
    Nov 18 00:57:55.488171 sonic INFO pmon#supervisord: xcvrd   File "/usr/bin/xcvrd", line 683, in <module>
    Nov 18 00:57:55.488171 sonic INFO pmon#supervisord: xcvrd     sys.exit(main())
    Nov 18 00:57:55.488171 sonic INFO pmon#supervisord: xcvrd   File "/usr/bin/xcvrd", line 606, in main
    Nov 18 00:57:55.488188 sonic INFO pmon#supervisord: xcvrd     rc = post_port_sfp_info_to_db(logical_port, int_tbl)
    Nov 18 00:57:55.488188 sonic INFO pmon#supervisord: xcvrd   File "/usr/bin/xcvrd", line 265, in post_port_sfp_info_to_db
    Nov 18 00:57:55.488206 sonic INFO pmon#supervisord: xcvrd     port_info_dict = platform_sfputil.get_transceiver_info_dict(physical_port)
    Nov 18 00:57:55.488206 sonic INFO pmon#supervisord: xcvrd   File "/usr/local/lib/python2.7/dist-packages/sonic_platform_base/sonic_sfp/sfputilbase.py", line 726, in get_transceiver_info_dict
    Nov 18 00:57:55.501232 sonic INFO pmon#supervisord: xcvrd     sfp_vendor_pn_raw = self._read_eeprom_specific_bytes(sysfsfile_eeprom, (offset + OSFP_VENDOR_PN_OFFSET), XCVR_VENDOR_PN_WIDTH)
    Nov 18 00:57:55.501232 sonic INFO pmon#supervisord: xcvrd   File "/usr/local/lib/python2.7/dist-packages/sonic_platform_base/sonic_sfp/sfputilbase.py", line 314, in _read_eeprom_specific_bytes
    Nov 18 00:57:55.501390 sonic INFO pmon#supervisord: xcvrd     print("Error: reading sysfs file %s" % sysfs_sfp_i2c_client_eeprom_path)
    Nov 18 00:57:55.501390 sonic INFO pmon#supervisord: xcvrd NameError: global name 'sysfs_sfp_i2c_client_eeprom_path' is not defined
    
    Signed-off-by: Dante Su <dante.su@broadcom.com>
    ds952811 committed Nov 18, 2020
    Configuration menu
    Copy the full SHA
    b6b4b81 View commit details
    Browse the repository at this point in the history