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

HOME environment variable points to /opt/app-root/src in python sample #23068

Open
vitaliy-guliy opened this issue Aug 1, 2024 · 4 comments
Open
Labels
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

@vitaliy-guliy
Copy link
Contributor

vitaliy-guliy commented Aug 1, 2024

Describe the bug

I noticed that on the developer sandbox and on the godfooding instance HOME environment variable is set to /opt/app-root/src.

It brings some problems.
First, that /opt/app-root/.... is not persisted and all the stored data are lost on workspace restart.
Seconds, it is not right ideologically, home directory should be located in /home, not in /opt.

Che version

7.88

Steps to reproduce

  • create a workspace
  • open a terminal, run
$ export | grep HOME

Expected behavior

HOME should be set to /home/user

Screenshots

Screenshot from 2024-08-01 11-49-42

Environment

Dev Sandbox (workspaces.openshift.com)

@vitaliy-guliy vitaliy-guliy added the kind/bug Outline of a bug - must adhere to the bug report template. label Aug 1, 2024
@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 Aug 1, 2024
@vitaliy-guliy vitaliy-guliy added severity/P1 Has a major impact to 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 Aug 1, 2024
@AObuchow
Copy link

AObuchow commented Aug 1, 2024

@vitaliy-guliy can you please share the devfile you used that encountered this error? I'm under the impression this is affecting tooling images other than the UDI, as I didn't reproduce the issue in the following devfile (UDI sample):

schemaVersion: 2.2.0
metadata:
  name: udi
  namespace: aobuchow-che-1cac83
  displayName: Universal Developer Image
  description: Universal Developer Image provides various programming languages tools and runtimes for instant coding
  icon: https://raw.githubusercontent.com/devfile/devfile-web/main/apps/landing-page/public/pwa-192x192.png
  tags:
    - Java
    - Maven
    - Scala
    - PHP
    - .NET
    - Node.js
    - Go
    - Python
    - Pip
    - ubi8
  projectType: universal
  language: Polyglot
  version: 1.0.0
components:
  - name: tools
    container:
      image: quay.io/devfile/universal-developer-image:ubi8-latest
      memoryLimit: 6G
      memoryRequest: 512Mi
      cpuRequest: 1000m
      cpuLimit: 4000m
      mountSources: true

@vitaliy-guliy
Copy link
Contributor Author

vitaliy-guliy commented Aug 1, 2024

@vitaliy-guliy can you please share the devfile you used that encountered this error?

It is a python sample from Create Workspace page.
I think it comes from this devfile https://github.com/devfile/registry/blob/main/stacks/python/2.2.0/devfile.yaml where tools container is registry.access.redhat.com/ubi9/python-39

Btw, on the developer sandbox persistence for /home/user directory is not configured.

@AObuchow
Copy link

AObuchow commented Aug 1, 2024

I don't believe we actually maintain that image https://catalog.redhat.com/software/containers/ubi9/python-39/61a61032bfd4a5234d59629e?container-tabs=overview

Maybe once the short term plan for https://issues.redhat.com/browse/CRW-6577?focusedId=25106725&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-25106725 is resolved, we can create a minimal python image based on our UBI that has home persistence & $HOME set correctly?

@AObuchow AObuchow changed the title HOME environment variable points to /opt/app-root/src HOME environment variable points to /opt/app-root/src in python sample Aug 1, 2024
@vitaliy-guliy
Copy link
Contributor Author

It is reproducible as well for go, dotnet, angular, and I believe for some other samples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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