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

[Bug][Arista]: snmp/test_snmp_phy_entity.py::test_snmp_phy_entity::test_fan_info fails with KeyError: 'position_in_parent' #16189

Open
arista-nwolfe opened this issue Dec 20, 2024 · 1 comment
Assignees

Comments

@arista-nwolfe
Copy link
Contributor

Issue Description

snmp/test_snmp_phy_entity.py::test_snmp_phy_entity::test_fan_info iterates through all FAN_INFO| entries in STATE_DB, this include fans connected to the fabric modules.
e.g. ['FAN_INFO|fan3/7', 'FAN_INFO|fan2/1', 'FAN_INFO|fan1/4', 'FAN_INFO|fan1/2', 'FAN_INFO|fan5/1', 'FAN_INFO|fan4/3', ...]
It then looks up each fan in the PHYSICAL_ENTITY_INFO| to get the parent modules:
e.g.

root@cmp227:~# sonic-db-cli STATE_DB hgetall "PHYSICAL_ENTITY_INFO|fan5/1"
{'position_in_parent': '1', 'parent_name': 'Module 7'}

It then expects the parent_name to also be in PHYSICAL_ENTITY_INFO| in STATE_DB but the fabric modules aren't in STATE_DB:

sonic-db-cli STATE_DB keys \* | grep -i "PHYSICAL_ENTITY_INFO|Module"

https://github.com/sonic-net/sonic-mgmt/blob/202405/tests/snmp/test_snmp_phy_entity.py#L301

Results you see

Fabric fan parent entity not present in PHYSICAL_ENTITY_INFO| in STATE_DB.

Results you expected to see

Either fabric modules should be included in PHYSICAL_ENTITY_INFO| in STATE_DB or we should skip testing fabric fans.

Is it platform specific

generic

Relevant log output

No response

Output of show version

No response

Attach files (if any)

No response

@yxieca
Copy link
Collaborator

yxieca commented Jan 8, 2025

@arlakshm please triage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants