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

Ephemeral storage workspace fails to start up if persistUserHome enabled #22654

Closed
AObuchow opened this issue Nov 3, 2023 · 1 comment
Closed
Assignees
Labels
area/devworkspace-operator kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.

Comments

@AObuchow
Copy link

AObuchow commented Nov 3, 2023

Describe the bug

If devEnvironments.persistUserHome: true is set in the Che Cluster CR, and a workspace is using ephemeral storage, the workspace will fail to start up with a similar error:

Error creating DevWorkspace deployment: Deployment.apps "workspace8ff6626e807c43d8" is invalid: [spec.template.spec.volumes[4].name: Invalid value: "persistentHome": a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?'), spec.template.spec.containers[0].volumeMounts[1].name: Not found: "persistentHome", spec.template.spec.initContainers[0].volumeMounts[1].name: Not found: "persistentHome"]

Che version

7.76@latest

Steps to reproduce

  1. Set devEnvironments.persistUserHome: true in the Che Cluster CR
  2. Create a workspace that uses the ephemeral storage strategy (this can be configured by clicking on a workspace in the dashboard and changing Storage Type).
  3. The workspace will fail to startup, as show in the screenshot below:

image

Expected behavior

The workspace starts up successfully.

Runtime

OpenShift

Screenshots

No response

Installation method

OperatorHub

Environment

Linux, GCE

Eclipse Che Logs

No response

Additional context

With eclipse-che/che-dashboard#896, the default devfile provided by the dashboard now uses ephemeral storage. Customers have been facing issues when upgrading to Che 7.76 where a workspace that used the default devfile (which previously used per-user storage) now uses ephemeral storage, and if persistUserHome was enabled, the workspace will fail to start. This makes it unobvious how to recover workspace data in /home/user/ that persists on the PVC.

Temporary workaround to resolve the issue on a per-workspace basis

If a workspace has failed to start up due to this bug (i.e. the workspace start up failure is similar to the one described) then the following workaround should allow the workspace to start up, and data from the workspace should be recoverable:

  1. Navigate to the workspace's page on the Che Dashboard:

image

  1. Click on the workspace name that has failed to start up:

image

  1. On the workspace information page, click on the pencil icon, to the right of Storage Type:

image

  1. Select the storage strategy that is configured in the Che Cluster CR's spec.devEnvironments.pvcStrategy. By default, it will be per-user, but it may be per-workspace if an admin configured the Che Cluster CR this way. In my case, the default per-user storage strategy was set in the Che Cluster CR, so I will change the storage type to per-user.

image

  1. Click "Save" after selecting the storage type. You should see the dashboard animate and say "Workspace updated".
  2. Start the workspace again, this can be done by clicking on the workspace on the sidebar on the left side, or by clicking Actions -> Restart Workspace on the workspace information page (as depicted below):

image

  1. The workspace should start up successfully. In my testing, I was able to see files, data, etc. that I had saved in the /home/user/ prior to the workspace failing to startup due to the use of the ephemeral storage strategy.
@AObuchow AObuchow added the kind/bug Outline of a bug - must adhere to the bug report template. label Nov 3, 2023
@AObuchow AObuchow self-assigned this Nov 3, 2023
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Nov 3, 2023
@AObuchow AObuchow removed the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Nov 3, 2023
@l0rd l0rd added severity/P1 Has a major impact to usage or development of the system. area/devworkspace-operator labels Nov 7, 2023
@AObuchow
Copy link
Author

Resolved in devfile/devworkspace-operator#1210

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devworkspace-operator kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

3 participants