test_snmp_queue: Error - Port Ethernet0 does not have queue counters
testcase test_snmp_queues fails with the message: Port Ethernet0 does not have queue counters
snmp_facts = get_snmp_facts(localhost, host=hostip, version="v2c",
community=creds_all_duts[duthost.hostname]["snmp_rocommunity"],
wait=True)['ansible_facts']
snmp_ifnames = [alias_port_name_map[v['name']]
for k, v in list(snmp_facts['snmp_interfaces'].items()) if v['name'] in alias_port_name_map]
for intf in q_interfaces:
assert intf in snmp_ifnames, "Port {} with QUEUE config is not present in snmp interfaces".format(intf)
for k, v in snmp_facts['snmp_interfaces'].items():
# v['name'] is alias for example Ethernet1/1
if v['name'] in alias_port_name_map:
intf = alias_port_name_map[v['name']]
# Expect all interfaces to have queue counters
assert 'queues' in v, "Port {} does not have queue counters".format(intf)
assert 'queues' in v, "Port {} does not have queue counters".format(intf)
AssertionError: Port Ethernet0 does not have queue counters
Steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
File "/data/tests/snmp/test_snmp_queue.py", line 77, in test_snmp_queues
assert 'queues' in v, "Port {} does not have queue counters".format(intf)
AssertionError: Port Ethernet0 does not have queue counters
Describe the results you expected:
no AssertionError and queue output
Output of show version:
SONiC Software Version: SONiC.HEAD.822455-master-5df03e1d
SONiC OS Version: 12
Distribution: Debian 12.7
Kernel: 6.1.0-22-2-amd64
Build commit: 5df03e1d
Build date: Thu Sep 12 20:32:38 UTC 2024
Built by: gitlab-runner@sonic-build-server03
Output of show techsupport:
(paste your output here or download and attach the file here )
Additional information you deem important (e.g. issue happens only occasionally):
Description
alias_port_name_map {'Recirc0/0': 'Ethernet-IB0', 'Recirc0/1': 'Ethernet-Rec0', 'Ethernet1/1': 'Ethernet0', 'Ethernet14/1': 'Ethernet104', 'Ethernet15/1': 'Ethernet112', 'Ethernet16/1': 'Ethernet120', 'Ethernet17/1': 'Ethernet128', 'Ethernet18/1': 'Ethernet136', 'Ethernet3/1': 'Ethernet16', 'Ethernet4/1': 'Ethernet24', 'Ethernet5/1': 'Ethernet32', 'Ethernet6/1': 'Ethernet40', 'Ethernet7/1': 'Ethernet48', 'Ethernet8/1': 'Ethernet56', 'Ethernet9/1': 'Ethernet64', 'Ethernet10/1': 'Ethernet72', 'Ethernet2/1': 'Ethernet8', 'Ethernet11/1': 'Ethernet80', 'Ethernet12/1': 'Ethernet88', 'Ethernet13/1': 'Ethernet96', 'Recirc1/0': 'Ethernet-IB1', 'Recirc1/1': 'Ethernet-Rec1', 'Ethernet19/1': 'Ethernet144', 'Ethernet20/1': 'Ethernet152', 'Ethernet21/1': 'Ethernet160', 'Ethernet22/1': 'Ethernet168', 'Ethernet23/1': 'Ethernet176', 'Ethernet24/1': 'Ethernet184', 'Ethernet25/1': 'Ethernet192', 'Ethernet26/1': 'Ethernet200', 'Ethernet27/1': 'Ethernet208', 'Ethernet28/1': 'Ethernet216', 'Ethernet29/1': 'Ethernet224', 'Ethernet30/1': 'Ethernet232', 'Ethernet31/1': 'Ethernet240', 'Ethernet32/1': 'Ethernet248', 'Ethernet33/1': 'Ethernet256', 'Ethernet34/1': 'Ethernet264', 'Ethernet35/1': 'Ethernet272', 'Ethernet36/1': 'Ethernet280'}
v['name'] 'Ethernet1/1'
intf = alias_port_name_map[v['name']] intf 'Ethernet0'
v {'ifindex': '0', 'name': 'Ethernet1/1', 'type': '6', 'mtu': '9100', 'speed': '4294967295', 'mac': '', 'adminstatus': 'up', 'operstatus': 'up', 'ifHighSpeed': '400000', 'description': 'ARISTA01T3:Ethernet1', 'ifInDiscards': '52', 'ifOutDiscards': '0', 'ifInErrors': '0', 'ifOutErrors': '0', 'ifHCInOctets': '608381', 'ifHCOutOctets': '746959', 'ifInUcastPkts': '0', 'ifOutUcastPkts': '4', 'lldpLocPortIdSubtype': '7', 'lldpLocPortId': 'Ethernet1/1', 'lldpLocPortDesc': 'ARISTA01T3:Ethernet1', 'lldpRemChassisIdSubtype': '4', 'lldpRemChassisId': '12:35:08:fd:f5:ca', 'lldpRemPortIdSubtype': '5', 'lldpRemPortId': 'Ethernet1', 'lldpRemPortDesc': '', 'lldpRemSysName': 'ARISTA01T3', 'lldpRemSysDesc': 'Arista Networks EOS version 4.29.4M-32548956.4294M (engineering build) running on an Arista cEOSLab', 'lldpRemSysCapSupported': '0x2800', 'lldpRemSysCapEnabled': '0x2800', 'lldpRemManAddrIfSubtype': '2', 'lldpRemManAddrIfId': '0', 'lldpRemManAddrOID': '1.3.6.1.2.1.2.2.1.1', 'cpfcIfRequests': '0', 'cpfcIfIndications': '0', 'requestsPerPriority': {'0': '0', '1': '0', '2': '0', '3': '0', '4': '0', '5': '0', '6': '0', '7': '0'}, 'indicationsPerPriority': {'0': '0', '1': '0', '2': '0', '3': '0', '4': '0', '5': '0', '6': '0', '7': '0'}}
assert 'queues' in v, "Port {} does not have queue counters".format(intf) AssertionError: Port Ethernet0 does not have queue counters
Steps to reproduce the issue:
1. 2. 3.
Describe the results you received:
File "/data/tests/snmp/test_snmp_queue.py", line 77, in test_snmp_queues assert 'queues' in v, "Port {} does not have queue counters".format(intf) AssertionError: Port Ethernet0 does not have queue counters
Describe the results you expected:
no AssertionError and queue output
Output of
show version
:Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):