postStart hook commands timeout#1440
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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
…rate_all Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
…ds generate_all Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
… commands Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
…rt hook commands Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
61d8918 to
85046e5
Compare
|
New changes are detected. LGTM label has been removed. |
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
85046e5 to
3b0e379
Compare
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
cf174a0 to
2813408
Compare
…disabled Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
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 <okurinny@redhat.com>
|
@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 <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
434a115 to
2d2ad37
Compare
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
|
/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
postStarthook failures in DevWorkspaces when hook commands not exiting within the timeout period, so that the workspace pod gets stuck inTerminatingstate and never gets deleted.This PR resolves the issue by:
timeoutforpostStarthook. User-provided commands are now wrapped with thetimeoututility. This ensures thatpostStarthook 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?
DevWorkspaceOperatorConfigwith thepostStarthook timeout duration (in seconds):DevWorkspacedesigned to have itspostStarthook time out:Failedphase.status.messageof 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-pathto trigger)v8-devworkspace-operator-e2e: DevWorkspace e2e testv8-che-happy-path: Happy path for verification integration with Che