-
Notifications
You must be signed in to change notification settings - Fork 464
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: cancel all operations if c.V1Alpha2().Run
fails.
#8256
Conversation
2036645
to
b035f5b
Compare
1f97be3
to
766b06f
Compare
defer system.Services(c.Runtime()).Shutdown(ctx) | ||
s := system.Services(c.Runtime()) | ||
defer func() { | ||
shutdownCtx, shutdownCtxCancel := context.WithTimeout(context.Background(), time.Minute) |
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 is required, because when we cancel the context, Shutdown(context)
sequence below will never run properly.
766b06f
to
fc20d4e
Compare
fc20d4e
to
682edee
Compare
we should rather fix the indefinite wait if we want to, but this place requires too much testing to get it right in all cases |
@smira are there any valid scenarios where running of sequencer should continue if the runtime failed? |
While we decide what to do with siderolabs#8263 and siderolabs#8256 this quickfix at least allows us to see what went wrong Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
probably not, but runtime failing correctly stops Talos except for the initialize sequence |
While we decide what to do with siderolabs#8263 and siderolabs#8256 this quickfix at least allows us to see what went wrong Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
The current code contains a deadlock if `c.V1Alpha2().Run` fails with an error because `EnforceKSPPRequirements` will indefinitely wait for a condition to happen, but the controller runtime is not running. This commit addresses this by replacing the error channel with `context.WithCancelCause` and canceling the context if the controller runner fails. Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
682edee
to
b4b6afc
Compare
This PR is stale because it has been open 45 days with no activity. |
Closed, there should be better solution. |
The current code contains a deadlock if
c.V1Alpha2().Run
fails with an error becauseEnforceKSPPRequirements
will indefinitely wait for a condition to happen, but the controller runtime is not running. This commit addresses this by replacing the error channel withcontext.WithCancelCause
and canceling the context if the controller runner fails.