Skip to content

Fix reboot without message #250

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jkmar
Copy link

@jkmar jkmar commented May 6, 2025

What I did

Fix gNOI cold reboot no message issue: sonic-net/sonic-buildimage#22545

How I did it

Use get instead of [] to cover no reboot message case

How to verify it

Tested gNOI warm reboot on a hardware switch.

root@sonic:~# docker exec -it gnmi bash
root@sonic:/# gnoi_client -notls -insecure -module System -rpc Reboot -jsonin '{"method":1}'
System Reboot
root@sonic:/# exit
root@sonic:~# journalctl -u sonic-hostservice.service -f
...
May 06 07:37:47 sonic python3[699742]: reboot: issue_reboot rpc called
May 06 07:37:47 sonic python3[699742]: reboot: Issuing cold reboot
...
May 06 07:38:18 sonic CCmisApi[700542]: reboot: Initiate shutdown command
client_loop: send disconnect: Broken pipe

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

root@sonic:~# journalctl -u sonic-hostservice.service
...
May 06 01:28:14 sonic python3[514659]: reboot: issue_reboot rpc called

no more logs after that

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

root@sonic:~# journalctl -u sonic-hostservice.service
...
May 06 07:37:47 sonic python3[699742]: reboot: issue_reboot rpc called
May 06 07:37:47 sonic python3[699742]: reboot: Issuing cold reboot
...
May 06 07:38:18 sonic CCmisApi[700542]: reboot: Initiate shutdown command

reboot is executed successfully

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkmar jkmar marked this pull request as ready for review May 6, 2025 15:43
@jkmar jkmar force-pushed the fix_reboot_without_message branch from 233fb2d to 19564a4 Compare May 6, 2025 15:53
@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkmar
Copy link
Author

jkmar commented May 14, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants