Skip to content

[server] Restart PVC workspace from latest valid backup #14053

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

Merged
merged 1 commit into from
Oct 24, 2022
Merged

Conversation

geropl
Copy link
Member

@geropl geropl commented Oct 20, 2022

Description

Related Issue(s)

Fixes #14030

How to test

  1. open a workspace on this PR
  2. make sure user_pvc is enabled for your user in ConfigCat
    1. after changing the rule, kubectl rollout restart deployment/server
  3. login
  4. start a workspace
  5. check the workspace pod, and verify that the label gitpod.io/pvcFeature: "true" is present ✔️
  6. stop the workspace
  7. start and stop that workspace another time
  8. manipulate the DB:
    1. Find the instances of your wrokspacId: select id, creationTime, status from d_b_workspace_instance WHERE workspaceId = ' ... ';
    2. Set the latest instance to failed; UPDATE d_b_workspace_instance SET status = JSON_SET(status, "$.conditions.failed", 'test') WHERE id = ' ... ';
  9. Start your workspace again, and see how it work ✔️

Release Notes

NONE

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-gpl-14030-pvc.2 because the annotations in the pull request description changed
(with .werft/ from main)

@geropl geropl requested a review from sagor999 October 20, 2022 15:59
@kylos101
Copy link
Contributor

👋 @geropl when testing, I recommend this at least: /werft run with-integration-tests=workspace with-large-vm=true

@geropl
Copy link
Member Author

geropl commented Oct 20, 2022

I recommend this at least: /werft run with-integration-tests=workspace with-large-vm=true

Hey @kylos101 , thx for the pointer!
Can you explain why those'd help? 🤔

  1. this should not affect any workspace integration tests
  2. what does with-large-vm do? :-o

@kylos101
Copy link
Contributor

Howdy @geropl ,

this should not affect any workspace integration tests

Good point! 🤦

what does with-large-vm do? :-o

This helps tests "run faster", sometimes they can timeout, by giving the preview environment more resources.

@geropl geropl marked this pull request as ready for review October 21, 2022 08:01
@geropl geropl requested a review from a team October 21, 2022 08:01
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Oct 21, 2022
@jankeromnes
Copy link
Contributor

jankeromnes commented Oct 21, 2022

when testing, I recommend this at least: /werft run with-integration-tests=workspace with-large-vm=true

FYI, it could help to put these options at the bottom of the PR description, so that every build of this PR gets them. 👍

@jankeromnes
Copy link
Contributor

jankeromnes commented Oct 21, 2022

FYI, I tested this PR with various scenarii that failed in the context of Gitpod's PVC prebuilds / #13991 :

  • incremental prebuilds
  • same prebuild different branch
  • opening prebuilds directly

(I have no idea if my workspaces/prebuilds were actually using PVC, but) doing these things worked perfectly. 🙌

@geropl
Copy link
Member Author

geropl commented Oct 21, 2022

(I have no idea if my workspaces/prebuilds were actually using PVC

@jankeromnes see description at the top on how to configure and check.

Copy link
Contributor

@sagor999 sagor999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@roboquat roboquat merged commit b633262 into main Oct 24, 2022
@roboquat roboquat deleted the gpl/14030-pvc branch October 24, 2022 08:58
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/S team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PVC] Workspace fails on restart with misconfigured initializer if some prior instance "failed"
6 participants