Skip to content

[201911] Backport: Rename the platform_reboot to the pre_reboot_hook, remove the sysfs power cycle#21687

Closed
jianyuewu wants to merge 1 commit intosonic-net:201911from
jianyuewu:201911_reboot_precheck
Closed

[201911] Backport: Rename the platform_reboot to the pre_reboot_hook, remove the sysfs power cycle#21687
jianyuewu wants to merge 1 commit intosonic-net:201911from
jianyuewu:201911_reboot_precheck

Conversation

@jianyuewu
Copy link
Contributor

@jianyuewu jianyuewu commented Feb 10, 2025

Backport commit #18324.

Why I did it

Back port graceful reboot instead of the sysfs power cycle to avoid filesystem corruption.

How I did it

Rename the platform_reboot script to the pre_reboot_hook. Remove the sysfs power cycle function, from now on the Debian reboot (/sbin/reboot) will be executed instead of the sysfs power cycle.

How to verify it

Start watching logs by using show log -f and journalctl -p debug -f Execute the reboot command from the switch CLI
Check in logs that all systemd services terminated

Which release branch to backport (provide reason below if selected)

  • 201911

Because 201911 branch is missing this change.

Tested branch (Please provide the tested image version)

SONiC.201911.209-bea968bb

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

Back port from master branch.

Why I did it
Back port graceful reboot instead of the sysfs power cycle to avoid
filesystem corruption.

How I did it
Rename the platform_reboot script to the pre_reboot_hook. Remove the
sysfs power cycle function, from now on the Debian reboot (/sbin/reboot)
will be executed instead of the sysfs power cycle.

How to verify it
Start watching logs by using show log -f and journalctl -p debug -f.
Execute the reboot command from the switch CLI.
Check in logs that all systemd services terminated.

Signed-off-by: Jianyue Wu <[email protected]>
@jianyuewu jianyuewu force-pushed the 201911_reboot_precheck branch from 96fb6b9 to 8b1c08b Compare February 13, 2025 12:37
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

@moshemos
Copy link

@bingwang-ms if this is needed for 1911 please merge, if not please let us know and we will close this PR

@jianyuewu jianyuewu closed this Feb 28, 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.

4 participants