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

[MultiAsic] sudo reboot command doesn't gracefully stop Asic syncd# on multiasic platform #2258

Merged
merged 1 commit into from
Jul 20, 2022

Conversation

mlok-nokia
Copy link
Contributor

What I did

Function stop_sonic_service() in /usr/local/bin/reboot script doesn't handle stopping the Asic syncd# on multiasic platform. Instead, it only stops the syncd on non-multiasic platform. When issue command "sudo reboot", the below message will be shown.

admin@sonic:~$ sudo reboot
Error: No such container: syncd

Fixes sonic-net/sonic-buildimage#11377

How I did it

Add code the stop_sonic_services() to check and get NUM_ASIC. If it is multiasic, looping all asics and call the syncd_request_shutdown for each asic.

How to verify it

Issue the "sudo reboot" on the multiasic platform, the error message "Error: No such container: syncd" should not be shown.

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

…n multiasic platform

Signed-off-by: mlok <marty.lok@nokia.com>
@mlok-nokia
Copy link
Contributor Author

@judyjoseph @prgeor Please help to review this PR. Thanks.

@prgeor prgeor requested a review from abdosi July 11, 2022 22:29
@prgeor
Copy link
Contributor

prgeor commented Jul 11, 2022

@abdosi can you review?

@mlok-nokia
Copy link
Contributor Author

@abdosi Please help review this PR, Thanks.

Copy link
Contributor

@abdosi abdosi left a comment

Choose a reason for hiding this comment

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

LGTM

@abdosi abdosi merged commit e1866e3 into sonic-net:master Jul 20, 2022
yxieca pushed a commit that referenced this pull request Jul 28, 2022
…n multiasic platform (#2258)

What I did
Function stop_sonic_service() in /usr/local/bin/reboot script doesn't handle stopping the Asic syncd# on multiasic platform. Instead, it only stops the syncd on non-multiasic platform. When issue command "sudo reboot", the below message will be shown.

admin@sonic:~$ sudo reboot
Error: No such container: syncd
Fixes sonic-net/sonic-buildimage#11377

How I did it
Add code the stop_sonic_services() to check and get NUM_ASIC. If it is multiasic, looping all asics and call the syncd_request_shutdown for each asic.

How to verify it
Issue the "sudo reboot" on the multiasic platform, the error message "Error: No such container: syncd" should not be shown.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MultiAsic] sudo reboot command doesn't gracefully stop Asic syncd# on multiasic platform.
4 participants