Skip to content

[202311][graceful reboot] Rename the platform_reboot to the pre_reboot_hook, remove the sysfs power cycle #18325

Merged
yxieca merged 2 commits intosonic-net:202311from
vadymhlushko-mlnx:202311-graceful-shutdown
Apr 22, 2024
Merged

[202311][graceful reboot] Rename the platform_reboot to the pre_reboot_hook, remove the sysfs power cycle #18325
yxieca merged 2 commits intosonic-net:202311from
vadymhlushko-mlnx:202311-graceful-shutdown

Conversation

@vadymhlushko-mlnx
Copy link
Copy Markdown
Contributor

DEPENDS ON: [graceful reboot] Add the pre_reboot_hook script execution, add the watchdog arm before the reboot

Why I did it

Add support for the graceful reboot instead of the sysfs power cycle to avoid filesystem corruption

Work item tracking
  • Microsoft ADO (number only):

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

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

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

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)

…emove sysfs power cycle, and Debina reboot

Signed-off-by: vadymhlushko-mlnx <vadymh@nvidia.com>
…r all mellanox devices

Signed-off-by: vadymhlushko-mlnx <vadymh@nvidia.com>
@vadymhlushko-mlnx vadymhlushko-mlnx force-pushed the 202311-graceful-shutdown branch from 249eef5 to ee764b7 Compare March 22, 2024 15:21
@bingwang-ms
Copy link
Copy Markdown
Contributor

@prgeor Can you please also review this PR? Thanks!

@liat-grozovik
Copy link
Copy Markdown
Collaborator

@yxieca kindly reminder, this is a major fix needed for 202311

@vadymhlushko-mlnx
Copy link
Copy Markdown
Contributor Author

vadymhlushko-mlnx commented Apr 11, 2024

@yxieca, @prgeor kind reminder to merge, the same changes were already merged into master

@prgeor
Copy link
Copy Markdown
Contributor

prgeor commented Apr 12, 2024

@vadymhlushko-mlnx appreciate if you could point to the master PR in the description

@vadymhlushko-mlnx
Copy link
Copy Markdown
Contributor Author

@vadymhlushko-mlnx appreciate if you could point to the master PR in the description

[graceful reboot] Rename the platform_reboot to the pre_reboot_hook, remove the sysfs power cycle #18324

@yxieca yxieca merged commit b23f6f2 into sonic-net:202311 Apr 22, 2024
DavidZagury added a commit to DavidZagury/sonic-buildimage that referenced this pull request Jun 24, 2024
And add the force flag to the reboot, which is needed now that we no longer use power cycle due to sonic-net#18325
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.

5 participants