-
Notifications
You must be signed in to change notification settings - Fork 61
postStart hook commands timeout #1440
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Oleksii Kurinnyi <[email protected]>
…rate_all Signed-off-by: Oleksii Kurinnyi <[email protected]>
Signed-off-by: Oleksii Kurinnyi <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: akurinnoy The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…ds generate_all Signed-off-by: Oleksii Kurinnyi <[email protected]>
e90b773
to
c342798
Compare
Signed-off-by: Oleksii Kurinnyi <[email protected]>
Signed-off-by: Oleksii Kurinnyi <[email protected]>
I tried the abovementioned steps and I was able to see probelematic workspace failing with
|
Signed-off-by: Oleksii Kurinnyi <[email protected]>
Signed-off-by: Oleksii Kurinnyi <[email protected]>
… commands Signed-off-by: Oleksii Kurinnyi <[email protected]>
Signed-off-by: Oleksii Kurinnyi <[email protected]>
…rt hook commands Signed-off-by: Oleksii Kurinnyi <[email protected]>
What does this PR do?
This PR addresses the issue of
postStart
hook failures in DevWorkspaces when hook commands not exiting within the timeout period, so that the workspace pod gets stuck inTerminating
state and never gets deleted.This PR resolves the issue by:
timeout
forpostStart
hook. User-provided commands are now wrapped with thetimeout
utility. This ensures thatpostStart
hook commands are terminated if they exceed a configurable duration. The timeout duration can be set in theDevWorkspaceOperatorConfig
(a value of 0 means no timeout):What issues does this PR fix or reference?
https://issues.redhat.com/browse/CRW-8329
Is it tested? How?
DevWorkspaceOperatorConfig
with thepostStart
hook timeout duration (in seconds):DevWorkspace
designed to have itspostStart
hook time out:Failed
phase.status.message
of the DevWorkspace should provide a reason for the failure, indicating a timeout. For example:Error creating DevWorkspace deployment: Container tools has state [postStart hook] Commands terminated by SIGTERM (likely timed out after 30s). Exit code 143.
PR Checklist
/test v8-devworkspace-operator-e2e, v8-che-happy-path
to trigger)v8-devworkspace-operator-e2e
: DevWorkspace e2e testv8-che-happy-path
: Happy path for verification integration with Che