sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
201 stars 727 forks source link

[platform tests] test_xcvr_info_in_db.py failing on some platforms #4998

Open dflynn-Nokia opened 2 years ago

dflynn-Nokia commented 2 years ago

Description

The following failure is seen when executing the test_xcvr_info_in_db.py platform test case on the Nokia marvell-armhf platform

E                   AssertionError: Expected field vendor_rev is not found in type
E                   SFP/SFP+/SFP28
E                   hardware_rev
E                   A.0
E                   serial
E                   BP194500040254
E                   manufacturer
E                   ACCELINK
E                   model
E                   RTXM228-551-C82
E                   vendor_oui
E                   00-1c-ad
E                   vendor_date
E                   2019-11-08 
E                   connector
E                   LC
E                   encoding
E                   64B/66B
E                   ext_identifier
E                   GBIC/SFP defined by twowire interface ID
E                   ext_rateselect_compliance
E                   Unspecified
E                   cable_type
E                   LengthOM3(UnitsOf10m)
E                   cable_length
E                   30
E                   specification_compliance
E                   {'10GEthernetComplianceCode': '10G Base-SR'}
E                   nominal_bit_rate
E                   103
E                   application_advertisement
E                   N/A
E                   is_replaceable
E                   True
E                   dom_capability
E                   N/A while checking Ethernet49

I believe this is due to the fact that sonic-mgmt PR# 4816 introduced an expectation that all platforms will have migrated from using hardware_rev to vendor_rev. This is not the case for the Nokia marvell-armhf platform currently based on the Sonic 202012 release.

Steps to reproduce the issue:

  1. Run the test_xcvr_info_in_db.py test case on the Nokia marvell-armhf platform

Describe the results you received: See Assert above.

Describe the results you expected: Test case pass

Additional information you deem important:

**Output of `show version`:**

```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```
dflynn-Nokia commented 2 years ago

It looks like this has been fixed in the following PR.

Azure/sonic-mgmt#4963

I will verify this fix and close this Issue when completed.

Vickyni2 commented 1 year ago

Hello @wangxin

I ran on T0-physical topology , am facing issue kindly suggest any solution .

def check_transceiver_basic(dut, asic_index, interfaces, xcvr_skip_list):
    """
    @summary: Check whether all the specified interface are in TRANSCEIVER_INFO redis DB.
    @param dut: The AnsibleHost object of DUT. For interacting with DUT.
    @param interfaces: List of interfaces that need to be checked.
    """
    logging.info("Check whether transceiver information of all ports are in redis")
    cmd = "redis-cli -n 6 keys TRANSCEIVER_INFO*"
    asichost = dut.asic_instance(asic_index)
    docker_cmd = asichost.get_docker_cmd(cmd, "database")
    xcvr_info = dut.command(docker_cmd)
    parsed_xcvr_info = parse_transceiver_info(xcvr_info["stdout_lines"])
    for intf in interfaces:
        if intf not in xcvr_skip_list[dut.hostname]:
          assert intf in parsed_xcvr_info, "TRANSCEIVER INFO of %s is not found in DB" % intf

E AssertionError: TRANSCEIVER INFO of Ethernet28 is not found in DB

asic_index = None asichost = <SonicAsic 0> cmd = 'redis-cli -n 6 keys TRANSCEIVER_INFO' docker_cmd = 'redis-cli -n 6 keys TRANSCEIVER_INFO' dut = interfaces = {'Ethernet0': {'peerdevice': u'dev-7260-10', 'peerport': u'Ethernet0', 'speed': u'40000'}, 'Ethernet100': {'peerdevice... 'speed': u'40000'}, 'Ethernet108': {'peerdevice': u'dev-7260-10', 'peerport': u'Ethernet108', 'speed': u'40000'}, ...} intf = 'Ethernet28' parsed_xcvr_info = [] xcvr_info = {'stderr_lines': [], u'cmd': [u'redis-cli', u'-n', u'6', u'keys', u'TRANSCEIVE...tdin_add_newline': True, u'stdin': None}}, 'stdout_lines': [], 'failed': False} xcvr_skip_list = {'dev-msn2700-01': []}

common/platform/transceiver_utils.py:70: AssertionError