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

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

Open
achdmbp opened this issue Feb 5, 2025 · 1 comment
Labels
area/udi Issues and PRs related to the universal developer image https://github.com/devfile/developer-images kind/bug Outline of a bug - must adhere to the bug report template. severity/P2 Has a minor but important impact to the usage or development of the system. team/B This team is responsible for the Web Terminal, the DevWorkspace Operator and the IDEs.

Comments

@achdmbp
Copy link

achdmbp commented Feb 5, 2025

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 achdmbp added the kind/bug Outline of a bug - must adhere to the bug report template. label Feb 5, 2025
@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 Feb 5, 2025
@dmytro-ndp dmytro-ndp added team/B This team is responsible for the Web Terminal, the DevWorkspace Operator and the IDEs. area/udi Issues and PRs related to the universal developer image https://github.com/devfile/developer-images severity/P2 Has a minor but important impact to the usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Feb 5, 2025
@dkwon17
Copy link
Contributor

dkwon17 commented Feb 5, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/udi Issues and PRs related to the universal developer image https://github.com/devfile/developer-images kind/bug Outline of a bug - must adhere to the bug report template. severity/P2 Has a minor but important impact to the usage or development of the system. team/B This team is responsible for the Web Terminal, the DevWorkspace Operator and the IDEs.
Projects
None yet
Development

No branches or pull requests

4 participants