The quay.io/devfile/universal-developer-image does not persist SDKMAN newly installed versions when a PVC is mounted to /home/user
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
- 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
- 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
- afterward if you run
java --versionyou will getopenjdk 23.0.2*as expected. - run
sdk list java,23.0.2-amznshows with status installed - restart workspace and run
java --versionyou will see it is back to defaultopenjdk 17.0.13* - run
sdk list java,23.0.2-amzndoesn'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
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?
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.