sonic-net / sonic-platform-daemons

Platform module daemons for SONiC
Other
25 stars 159 forks source link

Fix chassisd bug #560

Open vivekverma-arista opened 1 week ago

vivekverma-arista commented 1 week ago

Description

Fixed the bug in chassisd due to which incorrect number of ASICs were being pushed to CHASSIS_STATE_DB.

Motivation and Context

Fixes: #559

How Has This Been Tested?

admin@cmp217:~$ sonic-db-cli CHASSIS_STATE_DB hgetall "CHASSIS_MODULE_TABLE|LINE-CARD4"
{'slot': '5', 'hostname': 'cmp217-5', 'num_asics': '2'}

Checked on Arista 7804R3-FM platform with Arista 7800R3A-36DM2-C36 linecard inserted which has 2 ASICs Added a unit test for forwarding ASICs to test the same.

Additional Information (Optional)

arlakshm commented 1 week ago

can you please add some UT for this?

vivekverma-arista commented 1 day ago

can you please add some UT for this?

Done