che icon indicating copy to clipboard operation
che copied to clipboard

The quay.io/devfile/universal-developer-image does not persist SDKMAN newly installed versions when a PVC is mounted to /home/user

Open achdmbp opened this issue 10 months ago • 1 comments

Describe the bug

quay.io/devfile/universal-developer-image doesn't persist newly installed SDKMAN versions when a PVC is mounted to /home/user

Che version

7.95

Steps to reproduce

  1. use the following devfile.yaml to create a workspace
schemaVersion: 2.2.0
metadata:
  name: home-persistence-test
components:
  - container:
      image:  quay.io/devfile/universal-developer-image:latest
      sourceMapping: /projects
      volumeMounts:
        - name: home-vol
          path: /home/user
    name: tools
  - volume:
      size: 10Gi
    name: home-vol
  1. once workspace starts, run the following in a bash terminal to install java 23 and set it to default globally
sdk install java 23.0.2-amzn
sdk default java 23.0.2-amzn
  1. afterward if you run java --version you will get openjdk 23.0.2* as expected.
  2. run sdk list java, 23.0.2-amzn shows with status installed
  3. restart workspace and run java --version you will see it is back to default openjdk 17.0.13*
  4. run sdk list java, 23.0.2-amzn doesn't showa as it is installed

Expected behavior

after installing a new version of java and setting it to default using sdkman, restarting workspace should persist the new version

Runtime

OpenShift

Screenshots

No response

Installation method

OperatorHub

Environment

macOS

Eclipse Che Logs


Additional context

No response

achdmbp avatar Feb 05 '25 15:02 achdmbp

Hello, for quay.io/devfile/universal-developer-image, the sdkman candidates are stored here:

$ echo $SDKMAN_CANDIDATES_DIR
/home/tooling/.sdkman/candidates

To persist the new version of Java, could you try:

schemaVersion: 2.2.0
metadata:
  name: home-persistence-test
components:
  - container:
      image:  quay.io/devfile/universal-developer-image:latest
      sourceMapping: /projects
      volumeMounts:
        - name: candidates
          path: /home/tooling/.sdkman/candidates
    name: tools
  - volume:
      size: 10Gi
    name: candidates

Also, for persistent /home/user, have you considered enabling persistent user home from the CheCluster CR?

dkwon17 avatar Feb 05 '25 22:02 dkwon17

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

che-bot avatar Nov 13 '25 01:11 che-bot