[graceful reboot] Add the pre_reboot_hook script execution, add the watchdog arm before the reboot #3203
Merged
prgeor merged 1 commit intosonic-net:masterfrom Mar 19, 2024
Conversation
…atchdog arm before the reboot Signed-off-by: vadymhlushko-mlnx <[email protected]>
11 tasks
prgeor
reviewed
Mar 11, 2024
| ${DEVPATH}/${PLATFORM}/${PLATFORM_UPDATE_REBOOT_CAUSE} | ||
| fi | ||
|
|
||
| if [ -x ${DEVPATH}/${PLATFORM}/${PRE_REBOOT_HOOK} ]; then |
Contributor
There was a problem hiding this comment.
@vadymhlushko-mlnx why do we need pre_reboot_hook?
Contributor
Author
There was a problem hiding this comment.
@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
prgeor
approved these changes
Mar 12, 2024
qiluo-msft
pushed a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Mar 23, 2024
…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
arfeigin
pushed a commit
to arfeigin/sonic-utilities
that referenced
this pull request
Apr 2, 2024
…atchdog arm before the reboot (sonic-net#3203) Signed-off-by: vadymhlushko-mlnx <[email protected]>
liat-grozovik
pushed a commit
that referenced
this pull request
Sep 3, 2024
mssonicbld
pushed a commit
to mssonicbld/sonic-utilities
that referenced
this pull request
Sep 6, 2024
- 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
mssonicbld
pushed a commit
that referenced
this pull request
Sep 6, 2024
jianyuewu
pushed a commit
to jianyuewu/sonic-utilities
that referenced
this pull request
Feb 7, 2025
- 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
jianyuewu
pushed a commit
to jianyuewu/sonic-utilities
that referenced
this pull request
Feb 7, 2025
- 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
jianyuewu
pushed a commit
to jianyuewu/sonic-utilities
that referenced
this pull request
Feb 8, 2025
…atchdog arm before the reboot (sonic-net#3203) Signed-off-by: vadymhlushko-mlnx <[email protected]>
jianyuewu
pushed a commit
to jianyuewu/sonic-utilities
that referenced
this pull request
Feb 8, 2025
- 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 <[email protected]>
jianyuewu
pushed a commit
to jianyuewu/sonic-utilities
that referenced
this pull request
Feb 10, 2025
- 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
nmoray
pushed a commit
to nmoray/sonic-utilities
that referenced
this pull request
Jun 25, 2025
…atchdog arm before the reboot (sonic-net#3203) Signed-off-by: vadymhlushko-mlnx <[email protected]>
nmoray
pushed a commit
to nmoray/sonic-utilities
that referenced
this pull request
Jun 25, 2025
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_hookscript execution, add the watchdog arm before the reboot, in order to support thegraceful rebootinstead of the sysfs power cycle, to avoid filesystem corruption.How I did it
Modify the
scripts/rebootHow to verify it
show log -fandjournalctl -p debug -frebootcommand 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)