Skip to content

[chassis] test_update_testbed_metadata fails on supervisor card #4441

@arlakshm

Description

@arlakshm

Description
The test_update_testbed_metadata fails on supervisor card.

Steps to reproduce the issue:

  1. Runt the test test_update_testbed_metadata on sonic chassis

Describe the results you received:
The test test_update_testbed_metadata fails with below error

IndexError: list index out of range


Stack trace
duthosts = <tests.common.devices.duthosts.DutHosts object at 0x7f31970d5690>
tbinfo = {'auto_recover': 'True', 'comment': 'v-saidia', 'conf-name': 'vms26-t2-chassis-1', 'duts': ['str2-sonic-lc3-1', 'str2-sonic-lc6-1', 'str2-sonic-lc7-1', 'str2-sonic-sup-1'], ...}
def test_update_testbed_metadata(duthosts, tbinfo):
metadata = {}
tbname = tbinfo['conf-name']
pytest_require(tbname, "skip test due to lack of testbed name.")
for dut in duthosts:
>           dutinfo = collect_dut_info(dut)
dut        = <MultiAsicSonicHost> str2-sonic-sup-1
duthosts   = <tests.common.devices.duthosts.DutHosts object at 0x7f31970d5690>
dutinfo    = {'asic_services': defaultdict(<type 'list'>, {}), 'features': {'bgp': 'enabled', 'database': 'always_enabled', 'dhcp_r......}, 'Ethernet100': {'admin_state': u'up', 'alias': u'Ethernet26/1', 'fec': u'rs', 'name': u'Ethernet100', ...}, ...}}
metadata   = {'str2-sonic-lc3-1': {'asic_services': defaultdict(<type 'list'>, {}), 'features': {'bgp': 'enabled', 'database': 'alwa.....}, 'Ethernet100': {'admin_state': u'up', 'alias': u'Ethernet26/1', 'fec': u'rs', 'name': u'Ethernet100', ...}, ...}}}
tbinfo     = {'auto_recover': 'True', 'comment': 'v-saidia', 'conf-name': 'vms26-t2-chassis-1', 'duts': ['str2-sonic-lc3-1', 'str2-sonic-lc6-1', 'str2-sonic-lc7-1', 'str2-sonic-sup-1'], ...}
tbname     = 'vms26-t2-chassis-1'
test_pretest.py:135:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_pretest.py:106: in collect_dut_info
fe = random.choice(front_end_asics)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <random.Random object at 0x55c989ebd070>, seq = []
def choice(self, seq):
"""Choose a random element from a non-empty sequence."""
>       return seq[int(self.random() * len(seq))]  # raises IndexError if seq is empty
E       IndexError: list index out of range
self       = <random.Random object at 0x55c989ebd070>
seq        = []

Describe the results you expected:
The test case must pass without any errors

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions