-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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(workspace): force-stop workspaces stuck in a bad state #5055
Conversation
1480a29
to
a88243b
Compare
const preparingKillTime = creationTime + (this.config.timeouts.preparingPhaseSeconds * 1000); | ||
const unknownKillTime = creationTime + (this.config.timeouts.unknownPhaseSeconds * 1000); | ||
const exceededPreparingTime = Date.now() >= preparingKillTime; | ||
const exceededUnknown = Date.now() >= unknownKillTime; |
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.
add Time
to var
a88243b
to
1e234b3
Compare
3cf2ecd
to
2f8b04f
Compare
2f8b04f
to
c00a164
Compare
/lgtm |
LGTM label has been added. Git tree hash: 6959bff2c7695c390cf3398e182c7a60daf3ce9e
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: csweichel Associated issue: #5016 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
fixes #5016
This was tested by scaling the ws-manager to 0 (
kubectl scale deployment --replicas=0 ws-manager
) and then creating a new workspace. After the elapsed time (suggest editing the ConfigMap so not waiting 2 hours) when failing to start the workspace you'll see something like this:Things to note:
setInterval
does not kill any previous runs. There are 60 seconds between runs which SHOULD be enough, but this may need adjustingsetInterval
are logged. Suggest adding an alert (or at least adding to Prometheus)Future improvements:
Happy to demo to anyone who wants to see it, and to check it meets the needs of the ticket