Skip to content
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

[server] Improve maintenance of workspace instance state #12067

Closed
svenefftinge opened this issue Aug 11, 2022 · 1 comment · Fixed by #12080
Closed

[server] Improve maintenance of workspace instance state #12067

svenefftinge opened this issue Aug 11, 2022 · 1 comment · Fixed by #12080

Comments

@svenefftinge
Copy link
Member

When there's an exception happening in actuallyStartWorkspace we catch it and treat the start request as failed by updating the workspace_instance in the DB and marking it as stopped. The request to ws-manager might have succeeded, and the error might have been thrown later (the concrete case was a protocol error with billingservice).

We should try to keep the system consistent and try to cancel the workspace start with ws-manager in failInstanceStart.

Because the workspace instance was actually started, the stopped state will eventually be overwritten by ws-manager-bridge. It however only sets the status but doesn't reset the stoppedTimeand stoppingTimefields. If they are set, we should log an error but also set those two properties to their default state again.

@kylos101
Copy link
Contributor

Thank you @svenefftinge ! As a heads up, there is a similar state management issue that can cause workspaces to get stuck in Pending, too. Might be a good use case to test after this change is made.

cc: @laushinka

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants