-
Notifications
You must be signed in to change notification settings - Fork 65
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
e90b773
to
c342798
Compare
I tried the abovementioned steps and I was able to see probelematic workspace failing with
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: akurinnoy, rohanKanojia 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 |
Signed-off-by: Oleksii Kurinnyi <[email protected]>
…rate_all Signed-off-by: Oleksii Kurinnyi <[email protected]>
Signed-off-by: Oleksii Kurinnyi <[email protected]>
…ds generate_all Signed-off-by: Oleksii Kurinnyi <[email protected]>
Signed-off-by: Oleksii Kurinnyi <[email protected]>
Signed-off-by: Oleksii Kurinnyi <[email protected]>
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]>
Signed-off-by: Oleksii Kurinnyi <[email protected]>
Signed-off-by: Oleksii Kurinnyi <[email protected]>
61d8918
to
85046e5
Compare
New changes are detected. LGTM label has been removed. |
Signed-off-by: Oleksii Kurinnyi <[email protected]>
85046e5
to
3b0e379
Compare
Signed-off-by: Oleksii Kurinnyi <[email protected]>
Signed-off-by: Oleksii Kurinnyi <[email protected]>
cf174a0
to
2813408
Compare
…disabled Signed-off-by: Oleksii Kurinnyi <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1440 +/- ##
==========================================
+ Coverage 39.57% 40.00% +0.42%
==========================================
Files 160 160
Lines 13186 13333 +147
==========================================
+ Hits 5219 5334 +115
- Misses 7590 7622 +32
Partials 377 377 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@akurinnoy thank you for the update, but I get the fallback status message when starting
instead of the expected message:
Is it expected? |
…out is disabled Signed-off-by: Oleksii Kurinnyi <[email protected]>
@dkwon17 Hi,
I couldn't find any proof that this is expected behavior in the Kubernetes docs, but it seems to be the case. I also encountered this behavior while I was testing this PR. I ran the |
/retest |
1 similar comment
/retest |
Signed-off-by: Oleksii Kurinnyi <[email protected]>
Signed-off-by: Oleksii Kurinnyi <[email protected]>
Signed-off-by: Oleksii Kurinnyi <[email protected]>
434a115
to
2d2ad37
Compare
Signed-off-by: Oleksii Kurinnyi <[email protected]>
/retest |
After more testing, I noticed that this DW fails when the postStartTimeout is set, but succeeds when it is not set:
@akurinnoy are you able to reproduce the problem? |
@dkwon17 I can reproduce this problem. It occurs because the If so, I see two ways we could fix it:
How would you like to proceed? |
As discussed with @akurinnoy
|
/retest |
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