sonic-buildimage icon indicating copy to clipboard operation
sonic-buildimage copied to clipboard

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

Open vadymhlushko-mlnx opened this issue 2 years ago • 7 comments

DEPENDS ON: [202305][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)

vadymhlushko-mlnx avatar Mar 04 '24 15:03 vadymhlushko-mlnx

@prgeor Can you please also review this one?

bingwang-ms avatar Apr 01 '24 16:04 bingwang-ms

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

liat-grozovik avatar Apr 08 '24 11:04 liat-grozovik

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

vadymhlushko-mlnx avatar Apr 11 '24 06:04 vadymhlushko-mlnx

@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

vadymhlushko-mlnx avatar Apr 15 '24 09:04 vadymhlushko-mlnx

@prgeor could you please help to merge

vadymhlushko-mlnx avatar Apr 29 '24 11:04 vadymhlushko-mlnx

@prgeor could you please help to merge

@liat-grozovik can you merge.

prgeor avatar Apr 30 '24 22:04 prgeor

@liat-grozovik could you please merge

vadymhlushko-mlnx avatar May 03 '24 12:05 vadymhlushko-mlnx

@StormLiangMS , Can you please assist with merge ?

dprital avatar May 06 '24 16:05 dprital

@StormLiangMS @yxieca can you merge

prgeor avatar May 06 '24 20:05 prgeor

@StormLiangMS @yxieca can you please merge

vadymhlushko-mlnx avatar May 17 '24 12:05 vadymhlushko-mlnx

hi @bingwang-ms could you help to comment on this? Is this needed for 202305?

StormLiangMS avatar May 28 '24 11:05 StormLiangMS