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

Fixed bug in chassisd causing incorrect number of ASICs in CHASSIS_STATE_DB #560

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

vivekverma-arista
Copy link
Contributor

@vivekverma-arista vivekverma-arista commented Nov 11, 2024

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
Copy link
Contributor

can you please add some UT for this?

@vivekverma-arista
Copy link
Contributor Author

can you please add some UT for this?

Done

@arlakshm arlakshm requested a review from mlok-nokia December 1, 2024 20:23
@rlhui rlhui changed the title Fix chassisd bug Fixed bug in chassisd causing incorrect number of ASICs in CHASSIS_STATE_DB Dec 4, 2024
@rlhui rlhui merged commit 1962fca into sonic-net:master Dec 4, 2024
5 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-platform-daemons that referenced this pull request Dec 4, 2024
…ATE_DB (sonic-net#560)

Fixed the bug in chassisd due to which incorrect number of ASICs were being pushed to CHASSIS_STATE_DB.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #569

mssonicbld pushed a commit that referenced this pull request Dec 5, 2024
…ATE_DB (#560)

Fixed the bug in chassisd due to which incorrect number of ASICs were being pushed to CHASSIS_STATE_DB.
@vivekverma-arista vivekverma-arista deleted the fix-chassisd-bug branch December 5, 2024 13:01
@@ -353,6 +357,7 @@ class ModuleUpdater(logger.Logger):

# In line card push the hostname of the module and num_asics to the chassis state db.
# The hostname is used as key to access chassis app db entries
module_info_dict = self._get_module_info(my_index)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should move line 360 after the line361. Only call it when it is not Supervisor

@liamkearney-msft
Copy link

Hi @vivekverma-arista, this PR is causing an issue on Nokia 7250 chassis. See : sonic-net/sonic-buildimage#21131

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

Successfully merging this pull request may close these issues.

chassisd is pushing incorrect number of ASICs for linecards to CHASSIS_STAGE_DB
7 participants