-
Notifications
You must be signed in to change notification settings - Fork 161
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
Added SmartSwitch support in chassisd and enabling chassisd #467
base: master
Are you sure you want to change the base?
Conversation
d5ed9fc
to
0785bb1
Compare
platform identifier.
temp fix to get the build passing.
What are the states supported by the DPUs in the Smart Switch? |
”dpu_midplane_link_state” |
accidental removal of a few lines from the original chassisd file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as commented
The REBOOT_CAUSE_DIR is not accessible from the pmon docker where chassisd is running, (theres a diffierent /host/reboot created in the docker ) |
@gpunathilell Have you used the PR? This is needed for pmon docker to mount the volume. |
No, I see that the location is mounted in pmon in that PR, will include, please ignore comment |
sonic-chassisd/scripts/chassisd
Outdated
updates = { | ||
"dpu_midplane_link_state": state, | ||
"dpu_midplane_link_reason": "", | ||
"dpu_midplane_link_time": datetime.now().strftime("%Y%m%d %H:%M:%S"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rameshraghupathy I mean this line
"dpu_midplane_link_time": datetime.now().strftime("%Y%m%d %H:%M:%S"), | |
"dpu_midplane_link_time": datetime.now().strftime("%Y-%m-%d %H:%M:%S"), |
Will be displayed as such when we do show system-health dpu
:
DPU2 Online dpu_midplane_link_state up 2024-11-25 23:38:21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gpunathilell done
sonic-chassisd/scripts/chassisd
Outdated
@@ -92,6 +96,8 @@ INVALID_IP = '0.0.0.0' | |||
CHASSIS_MODULE_ADMIN_STATUS = 'admin_status' | |||
MODULE_ADMIN_DOWN = 0 | |||
MODULE_ADMIN_UP = 1 | |||
REBOOT_CAUSE_DIR = "/host/reboot-cause/module/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rameshraghupathy rename to MODULE_REBOOT_CAUSE_DIR
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prgeor Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, @prgeor to review and approve
@rameshraghupathy see conflict |
@rameshraghupathy could you check the failures |
@vvolam could you review and sign-off? |
@prgeor resolved |
…e event with the original code and hence the set_initial_state function was required. Now the modififed smartswitch mode properly generates the initial config change event trigger also. So this function is no longer needed. If it is present it sends duplicate config change events the first time
@rameshraghupathy could you resolve the build issue? |
/azp run |
Commenter does not have sufficient privileges for PR 467 in repo sonic-net/sonic-platform-daemons |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me. Approving based on my knowledge.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@prgeor could you please help merge if all comments are addressed? |
Added SmartSwitch support in chassisd and enabling chassisd for fixed SmartSwitches
Description
chassisd is enabled only for modular chassis. Smartswitch is a fixed chassis. However it has been treated like a modular chassis to manage the DPU cards just like the line-cards of a modular chassis. chassisd will be enabled only on the smartswitch NPU and hence the scope of these changes are limited only to NPU and not applicable to DPU.
Motivation and Context
chassisd is enabled only for modular chassis. Smartswitch is a fixed chassis. However it has been treated like a modular chassis to manage the DPU cards just like the line-cards of a modular chassis. Hence, chassid is needed for SmartSwitch and enabled here. Also, some of the table updates and clean up are not required for SmartSwitch platform and hence using the is_smartswitch API to selectively enable it. the text "fixes #xxxx", "closes #xxxx" or "resolves #xxxx" here
How Has This Been Tested?
Additional Information (Optional)