Skip to content
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: store and execute desired action on emergency action #8028

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

smira
Copy link
Member

@smira smira commented Dec 4, 2023

Fixes #7854

Talos runs an emergency handler if the sequence experiences an unrecoverable failure. The emergency handler was unconditionally executing "reboot" action if no other action was received (which only gets received if the sequence completes successfully), so the Shutdown request might result in a Reboot behavior on error during shutdown phase.

This is not a pretty fix, but it's hard to deliver the intent from one part of the code to another right now, so instead use a global variable which stores default emergency intention, and gets overridden early in the Shutdown sequence.

@smira smira added this to the v1.7 milestone Dec 4, 2023
Copy link
Member

@frezbo frezbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope we can clean this once we have controller based sequences

@smira smira force-pushed the fix/shutdown-on-error branch from be95665 to 5692e22 Compare December 4, 2023 15:08
Fixes siderolabs#7854

Talos runs an emergency handler if the sequence experience and
unrecoverable failure. The emergency handler was unconditionally
executing "reboot" action if no other action was received (which only
gets received if the sequence completes successfully), so the Shutdown
request might result in a Reboot behavior on error during shutdown
phase.

This is not a pretty fix, but it's hard to deliver the intent from one
part of the code to another right now, so instead use a global variable
which stores default emergency intention, and gets overridden early in
the Shutdown sequence.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
@smira smira force-pushed the fix/shutdown-on-error branch from 5692e22 to 474fa04 Compare December 4, 2023 15:51
@smira
Copy link
Member Author

smira commented Dec 4, 2023

/m

@talos-bot talos-bot merged commit 474fa04 into siderolabs:main Dec 4, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Backported
Development

Successfully merging this pull request may close these issues.

🐛 Talos turns shutdown into reboot event
3 participants