-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Update for the procedures for insertion/hot swap of Switch Fabric Module(SFM) by using "config chassis modules shutdown/startup" commands #18578
Conversation
[Unit] | ||
Description=Chassis module up & down operation | ||
ConditionPathExists=/etc/sonic/chassisdb.conf | ||
Requires=database.service updategraph.service |
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.
updategraph.service is a 202205 service which does not exist in 202405 (master). This is for 202205 cherry-pick purpose. We need another PR to change this in master after this PR fix has been picked up by 202205. Any better strategy here?
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.
@mlok-nokia , can you comment on this?
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.
No longe applicable
@arlakshm @judyjoseph For SFM module shutdown/startup process, we need to create a chassis_module_config.service which calls the chassis_module_config.py to subscribes and listen to the CHASSIS_MODULE table in CONFIG_DB. But the service requires/after the updategraph.service (in 202205). But updategraph.service file has been replaced by config-setup.service in Master branch. Now, we created a PR in Master and with the Check Mark applicable to 202205. Should we still use updategraph.service in the PR and fix it after the 202205 cherry-pick? |
@JunhongMao I understand that with this PR and nokia/sonic-platform#6, trying to have the shut/start of SFM + swss/syncd processes in the nokia platform submodule. Can we make this a bit more generic, like when user issue "sudo config chassis modules shutdown FABRIC-CARD3", we can have the implementation in sonic-utilities to start/stop swss/syncd systemd service + call nokia platform API to power up/down the corresponding card ? In this way this command will have a sonic common implementation with a platform hook to really power up/down SFM. |
Hi Judy, The following reasons is why we need to define a service file to subscribe the "CHASSIS_MODULE" tables to shutdown/startup a SFM and related swss/syncd services is that - when users shutdown a SFM and save the config file, then reboot the chassis. When chassis is booting and loading config, we need to keep the SFM and swss/syncd in the down state based on the configuration. Should we have a call to talk about this? Thanks. |
@@ -0,0 +1,80 @@ | |||
#!/usr/bin/env python3 |
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.
why do we another service to handle CLI command?
We can call the platform script from the CLI handler?
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.
In this solution, chassis_module_config.py needs to subscribe the "CHASSIS_MODULE" tables to shutdown/startup a SFM and related swss/syncd services other than directly calls the platform script from the CLI handler. This solution has some considerations, please refer to #18578 (comment). Thanks.
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.
why do we another service to handle CLI command? We can call the platform script from the CLI handler?
@arlakshm For the case -- If user shutdowns the SFM and save the configuration file. And reboot the whole chassis, do we want to keep the SFM down after the system is up? If we don't need to handle this case, we can directly call the platform script from the CLI handler.
@JunhongMao and @mlok-nokia, as discussed offline with update the PR will latest proposal. |
This PR has been replaced by the below new PRS: |
Why I did it
For the Nokia SONiC chassis procedures for insertion/hot swap of Switch Fabric Module(SFM),
the previous solution was using the below commands.
This PR along with the below PR intend to add the below commands for the equivalent operations.
nokia/sonic-platform#6
Work item tracking
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)