-
Notifications
You must be signed in to change notification settings - Fork 684
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
[graceful reboot] Add the pre_reboot_hook script execution, add the watchdog arm before the reboot #3203
[graceful reboot] Add the pre_reboot_hook script execution, add the watchdog arm before the reboot #3203
Conversation
…atchdog arm before the reboot Signed-off-by: vadymhlushko-mlnx <vadymh@nvidia.com>
@@ -242,6 +253,23 @@ if [ -x ${DEVPATH}/${PLATFORM}/${PLATFORM_UPDATE_REBOOT_CAUSE} ]; then | |||
${DEVPATH}/${PLATFORM}/${PLATFORM_UPDATE_REBOOT_CAUSE} | |||
fi | |||
|
|||
if [ -x ${DEVPATH}/${PLATFORM}/${PRE_REBOOT_HOOK} ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vadymhlushko-mlnx why do we need pre_reboot_hook?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prgeor this PR comes in bundle [graceful reboot] Rename the platform_reboot to the pre_reboot_hook, remove the sysfs power cycle #18324.
For MLNX we removed the sysfs power cycle
from the platform_reboot
script and because the platform_reboot
is no longer doing any reboot, we decided to rename it from platform_reboot
to pre_reboot_hook
…remove the sysfs power cycle (#18324) **DEPENDS ON: [[graceful reboot] Add the pre_reboot_hook script execution, add the watchdog arm before the reboot](sonic-net/sonic-utilities#3203 #### Why I did it Add support for the `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 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
…atchdog arm before the reboot (sonic-net#3203) Signed-off-by: vadymhlushko-mlnx <vadymh@nvidia.com>
- What I did Add back the support to call reboot -f The support for this option was accidentally removed as part of this PR sonic-net#3203 The same PR for 202311 doesn't have this mistake - sonic-net#3204 - How I did it - How to verify it Call reboot -f
- What I did Add back the support to call reboot -f The support for this option was accidentally removed as part of this PR sonic-net#3203 The same PR for 202311 doesn't have this mistake - sonic-net#3204 - How I did it - How to verify it Call reboot -f
- What I did Add back the support to call reboot -f The support for this option was accidentally removed as part of this PR sonic-net#3203 The same PR for 202311 doesn't have this mistake - sonic-net#3204 - How I did it - How to verify it Call reboot -f
…atchdog arm before the reboot (sonic-net#3203) Signed-off-by: vadymhlushko-mlnx <vadymh@nvidia.com>
- What I did Add back the support to call reboot -f The support for this option was accidentally removed as part of this PR sonic-net#3203 The same PR for 202311 doesn't have this mistake - sonic-net#3204 - How I did it - How to verify it Call reboot -f Signed-off-by: Jianyue Wu <jianyuew@nvidia.com>
- What I did Add back the support to call reboot -f The support for this option was accidentally removed as part of this PR sonic-net#3203 The same PR for 202311 doesn't have this mistake - sonic-net#3204 - How I did it - How to verify it Call reboot -f
DEPENDS ON: [graceful reboot] Rename the platform_reboot to the pre_reboot_hook, remove the sysfs power cycle #18324
What I did
Add the
pre_reboot_hook
script execution, add the watchdog arm before the reboot, in order to support thegraceful reboot
instead of the sysfs power cycle, to avoid filesystem corruption.How I did it
Modify the
scripts/reboot
How to verify it
show log -f
andjournalctl -p debug -f
reboot
command from the switch CLIPrevious 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)