-
Notifications
You must be signed in to change notification settings - Fork 17
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(shutdown): handle termination for container #23
Conversation
@radu-matei does this close/resolve the referenced issues? |
This commit handles incoming termination signal for tasks, ensuring tasks are correctly terminated. Signed-off-by: Radu Matei <[email protected]> Co-authored-by: Rajat Jindal <[email protected]>
bf26bdb
to
77b383b
Compare
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.
confirmed that while sudo ctr task kill static --signal 2
used to not work it does with these changes
@kate-goldenring this is part of resolving #22 (the other part being in Spin). |
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.
LGTM. Added one question for my own understanding
log::error!("ERROR >>> Trigger executor failed: {:?}", err); | ||
Err(err) | ||
} | ||
Err(aborted) => { |
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.
In what situations will the spin engine abort?
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.
Hi @Mossaka,
My understanding (based on running tests with a k3d based setup) is that when a pod is terminating, it will send the TERM signal to the shim. and because we were not handling the term signal, this will continue to run until a KILL signal is sent after TerminateGracefulSeconds limit is crossed.
Thank you
This commit handles incoming termination signal for tasks, ensuring
tasks are correctly terminated.
diff for this change: bf26bdb
ref #22
ref spinkube/spin-operator#40
ref deislabs/containerd-wasm-shims#207
Signed-off-by: Radu Matei [email protected]
Co-authored-by: Rajat Jindal [email protected]