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

Can not restart the workspace from the local devfile #22768

Closed
jorgeadrian93 opened this issue Jan 16, 2024 · 4 comments
Closed

Can not restart the workspace from the local devfile #22768

jorgeadrian93 opened this issue Jan 16, 2024 · 4 comments
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

@jorgeadrian93
Copy link

jorgeadrian93 commented Jan 16, 2024

Describe the bug

After making a small change to my devfile (like add a new env var) to test the option: Dev Spaces: Restart Workspace from Local Devfile. The workspace does not restart and displays error messages such as: aborted, http request failed (see attached images)

I have already tested this with multiple projects and basic devfiles but with the same result.

Che version

7.77

Steps to reproduce

devfile content when starting the workspace:

schemaVersion: 2.2.0
metadata:
  name: my-app
attributes:
  controller.devfile.io/storage-type: per-workspace
components:
- name: tools
  container:
    image: quay.io/devfile/universal-developer-image:ubi8-latest
    mountSources: true
    sourceMapping: /projects
    volumeMounts:
    - name: home
      path: /home/user/
    memoryLimit: 6G
    memoryRequest: 2G
- volume:
    size: 10Gi
  name: home

commands:
  - id: package
    exec:
      label: "Package"
      component: tools
      workingDir: ${PROJECT_SOURCE}
      commandLine: "mvn clean package"
      group:
        kind: build
        isDefault: true

Expected behavior

Add an environment variable and restart workspace from local devfile

schemaVersion: 2.2.0
metadata:
  name: my-app
attributes:
  controller.devfile.io/storage-type: per-workspace
components:
- name: tools
  container:
    image: quay.io/devfile/universal-developer-image:ubi8-latest
    env:
      - name: TEST_RESTART
        value: 'Restart from Local DevFile'
    mountSources: true
    sourceMapping: /projects
    volumeMounts:
    - name: home
      path: /home/user/
    memoryLimit: 6G
    memoryRequest: 2G
- volume:
    size: 10Gi
  name: home

commands:
  - id: package
    exec:
      label: "Package"
      component: tools
      workingDir: ${PROJECT_SOURCE}
      commandLine: "mvn clean package"
      group:
        kind: build
        isDefault: true

Runtime

OpenShift

Screenshots

image

image

image

Installation method

OperatorHub

Environment

Linux

Eclipse Che Logs

No response

Additional context

I found these related issues:
#22453
#22722
#22432

@jorgeadrian93 jorgeadrian93 added the kind/bug Outline of a bug - must adhere to the bug report template. label Jan 16, 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 Jan 16, 2024
@AObuchow
Copy link

@jorgeadrian93 Thank you for reporting this.

I need to do some testing to figure out why you're receiving this error and will report back here.

@AObuchow AObuchow added area/devworkspace-operator and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Jan 17, 2024
@tolusha
Copy link
Contributor

tolusha commented Jan 17, 2024

@jorgeadrian93
Do you have proxy configured on the cluster?

@ibuziuk
Copy link
Member

ibuziuk commented Jan 17, 2024

@jorgeadrian93 according to the screenshots Dev Spaces 3.10 version is used, and restart from local devfile is supposed to work on this version - you can try it out on workspaces.openshift.com.

Indeed, if there is a proxy configured on a cluster, there is currently a known issue, that is supposed to be fixed in the next version of Dev Spaces - https://issues.redhat.com/browse/CRW-5421

The workaround is to update CR accordingly:

spec:
  components:
    cheServer:
      proxy:
        nonProxyHosts:
          - "172.30.0.1" 

basically, KUBERNETES_SERVICE_HOST needed to be added to the no-proxy list by default. We did a similar exercise in DWO some time ago, and now need to do the same for the operator - devfile/devworkspace-operator#840

@ibuziuk ibuziuk added the severity/P1 Has a major impact to usage or development of the system. label Jan 17, 2024
@jorgeadrian93
Copy link
Author

Awesome! With the addition of the no-proxy rule as described by @ibuziuk , it is now working 🚀 Thanks a TON y'all.

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

5 participants