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
fix: loader script reboot #1041
Conversation
scripts/loader
Outdated
@@ -79,6 +79,7 @@ while [ $j -le 3 ] && [ $sigterm_received -eq 0 ]; do | |||
101) | |||
echo "Rebooting host" | |||
sudo reboot | |||
exit 101 |
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.
This will cause systemd to restart us which may or may not happen before the reboot. I think you need to just pause here
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.
After calling reboot, systemd will try to stop the service, so I think here systemd won't restart it after exit.
But how about just exit 0
here, because we finished successfully as far as systemd is concerned?
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.
That's probably OK, yes
Unit Tests Coverage Report
Minimum allowed coverage is Generated by 🐒 cobertura-action against 2502e35 |
Integration Tests Coverage Report
Minimum allowed coverage is Generated by 🐒 cobertura-action against 2502e35 |
19044a2
to
f0f5bda
Compare
Issue #, if available:
Description of changes:
Exit immediately after calling
sudo reboot
. Otherwise the script continues to run until the end. It'll create thealts/broken
symlink and makes nucleus think it failed.Why is this change necessary:
Without the fix, deployment with any component that requests reboot will fail.
How was this change tested:
Manual.
Any additional information or context required to review the change:
Checklist:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.