-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix for bug-21459: Set the initial DPU admin state #588
base: master
Are you sure you want to change the base?
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@rameshraghupathy could you update fixes tag in description to point to sonic-net/sonic-buildimage#21459? |
@vvolam Done |
sonic-chassisd/scripts/chassisd
Outdated
try: | ||
# Get admin state of DPU | ||
admin_state = self.module_updater.get_module_admin_status(module_name) | ||
if admin_state == 'empty' and operational_state != ModuleBase.MODULE_STATUS_ONLINE: |
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.
if admin_state == 'empty' and operational_state != ModuleBase.MODULE_STATUS_ONLINE: | |
if admin_state == 'empty' and operational_state == ModuleBase.MODULE_STATUS_ONLINE: |
Shouldnt the admin state be set to down if there is no data in CONFIG_DB and if the module is currently online?
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 Good catch! I would prefer to keep it as "if admin_state == 'empty' and operational_state != ModuleBase.MODULE_STATUS_OFFLINE:" as there are other states besides ONLINE" Hope this works for you.
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 good. I will approve once I use this and test. Thank you
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Description
Set the initial DPU admin state to "down" for DPUs that don't have the "CHASSIS_MODULE" configured. The default is "down"
Fixes: sonic-net/sonic-buildimage#21459
Motivation and Context
The chassisd config change handler is not triggering the config change event the very first time.
How Has This Been Tested?
The new set of smartswitch tests added into sonic-mgmt
Additional Information (Optional)