-
Notifications
You must be signed in to change notification settings - Fork 0
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
internal [202305] Add the pre_reboot_hook
script execution, add the watchdog arm before the reboot
#26
Conversation
fa4ec22
to
35c42f7
Compare
scripts/reboot
Outdated
if [ -x ${DEVPATH}/${PLATFORM}/${PRE_REBOOT_HOOK} ]; then | ||
debug "Executing the pre-reboot script" | ||
${DEVPATH}/${PLATFORM}/${PRE_REBOOT_HOOK} | ||
fi |
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.
If this script fails we might want to abort the reboot operation (unless it is beeing forced).
Also, in case it fails, I wonder whether we should update reboot cause by above if
block?
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.
Fixed.
The previous implementation also didn't change the reboot cause if it fails.
scripts/reboot
Outdated
if [ -x ${DEVPATH}/${PLATFORM}/${PLAT_REBOOT} ]; then | ||
VERBOSE=yes debug "Rebooting with platform ${PLATFORM} specific tool ..." | ||
${DEVPATH}/${PLATFORM}/${PLAT_REBOOT} $@ | ||
${DEVPATH}/${PLATFORM}/${PLAT_REBOOT} ${REBOOT_FLAGS} |
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.
I'd leave it as is, you might break someones flags.
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.
Fixed
fca7356
to
a7c2f2e
Compare
… --force flag bug Signed-off-by: vadymhlushko-mlnx <[email protected]>
a7c2f2e
to
2577790
Compare
pre_reboot_hook
script execution, add the watchdog arm before the reboot
2577790
to
d58d529
Compare
d58d529
to
2577790
Compare
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)