Skip to content

[ws-manager] Add event to workspace Pod when the PVC restored from the VolumeSnapshot #11367

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 5 commits into from
Jul 18, 2022

Conversation

jenting
Copy link
Contributor

@jenting jenting commented Jul 14, 2022

Description

We add an event to the workspace Pod in #10889 for the take volume snapshot operation (InProgress, ReadyToUse).
In this PR, we add an event to the workspace Pod when the PVC is restored from the VolumeSnapshot.
Hence, we would know the workspace Pod PVC is restored from the VolumeSnapshot or not.

Related Issue(s)

Fixes #10887

How to test

  1. Create a preview environment and enable the feature flag persistent_volume_claim.
  2. Launch a workspace
  3. Describe the workspace pod, and the event message should matches
    Events:
      Type    Reason                  Age   From                     Message
      ----    ------                  ----  ----                     -------
      Normal  PersistentVolumeClaim   19s   ws-manager               PVC "<pvd-name>" created successfully
  4. and write a large data into it.
    dd if=/dev/urandom of=data bs=16M count=1
  5. Stop the workspace.
  6. Relaunch the workspace, and describe the workspace pod, the event message should matches
    Events:
      Type    Reason                  Age   From                     Message
      ----    ------                  ----  ----                     -------
      Normal  PersistentVolumeClaim   3s    ws-manager               PVC "<pvc-name>" restored from volume snapshot "<volume-snapshot-name>" successfully

Release Notes

[experimental] Add PVC created message to the workspace pod event

Documentation

N/A

Werft options:

  • /werft with-preview

@jenting
Copy link
Contributor Author

jenting commented Jul 14, 2022

/werft run -a with-preview=true

👍 started the job as gitpod-build-jenting-10887.1
(with .werft/ from main)

@jenting jenting force-pushed the jenting/10887 branch 14 times, most recently from 0e5288a to f4dc1d7 Compare July 18, 2022 05:18
@jenting jenting marked this pull request as ready for review July 18, 2022 05:51
@jenting jenting requested a review from a team July 18, 2022 05:51
@github-actions github-actions bot added the team: workspace Issue belongs to the Workspace team label Jul 18, 2022
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
/hold
for fixing log

@sagor999
Copy link
Contributor

/unhold

@roboquat roboquat merged commit 1d5e26c into main Jul 18, 2022
@roboquat roboquat deleted the jenting/10887 branch July 18, 2022 18:34
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note size/M team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ws-manager: Add volume snapshot related events to workspace pod event log
3 participants