Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-5385

Accessing the OpenShift API from workspaces in disconnected clusters fail with "HttpError: HTTP request failed"

XMLWordPrintable

    • False
    • None
    • False
    • Release Notes
    • Hide
      = Accessing OpenShift API from workspace failed

      Before this update, accessing OpenShift API from a workspace in a disconnected cluster failed with the following error message: "HttpError: HTTP request failed". With this update, the issue is fixed.
      Show
      = Accessing OpenShift API from workspace failed Before this update, accessing OpenShift API from a workspace in a disconnected cluster failed with the following error message: "HttpError: HTTP request failed". With this update, the issue is fixed.
    • Bug Fix
    • Done
    • Workaround Exists
    • Hide

      Deploy Dev Spaces with the next value of "nonProxyHosts" parameter in CheCluster custom resource:

      spec:
        components:
          cheServer:
            proxy:
              nonProxyHosts:
                - "172.30.0.1" 
      
      Show
      Deploy Dev Spaces with the next value of " nonProxyHosts " parameter in CheCluster custom resource: spec: components: cheServer: proxy: nonProxyHosts: - "172.30.0.1"

      Description of problem:

      Workaround

      Prerequisites (if any, like setup, operators/versions):

      Steps to Reproduce

      1. Deploy Dev Spaces 3.10.0.GA tp air-gapped OCP.
      2. Go to Dashboard, create and open workspace
      3. In VS Code Editor go to "Top menu > View > Command palette" and execute "Dev Spaces: Restart Workspace from Local Devfile." command.
      4. In VS Code Editor go to "Top menu > View > Command palette" and execute "Dev Spaces: Restart Workspace." command.

       

      Actual results:

      Screencast: Restart_Workspace_commands_failure_in_ds_3.10.0.webm

      1. "Dev Spaces: Restart Workspace from Local Devfile" command failed to execute.

      error popup
      Can not restart the workspace from the local devfile: HttpError: HTTP request failed
      
      Source: Eclipse Che Remote (Extension)
      
      browser console log
      [Extension Host] Using http://plugin-registry.openshift-devspaces.svc:8080/v3 to generate a new Devfile Context workbench.web.main.js:146:453
      [Extension Host] DevWorkspace che-code-java-lombok was generated. workbench.web.main.js:146:453
        ERR [Extension Host] Something went wrong for the 'Restart From Local Devfile' action: HttpError: HTTP request failed workbench.web.main.js:642:3592
      [Extension Host] Something went wrong for the 'Restart From Local Devfile' action: HttpError: HTTP request failed workbench.web.main.js:146:453
      Can not restart the workspace from the local devfile: HttpError: HTTP request failed workbench.web.main.js:766:35562
          c https://devspaces.apps.ds-airgap-v13.crw-qe.com/admin/java-lombok/3100/oss-dev/static/out/vs/workbench/workbench.web.main.js:766
          b https://devspaces.apps.ds-airgap-v13.crw-qe.com/admin/java-lombok/3100/oss-dev/static/out/vs/workbench/workbench.web.main.js:766
      

      2. "Dev Spaces: Restart Workspace" command failed to execute, and there was no any visible outcome.

      Browser console showed error message:

      browser console log
        ERR HTTP request failed: Error: HTTP request failed
      	at n.h (/checode/checode-linux-libc/out/vs/workbench/api/node/extensionHostProcess.js:125:88587)
      	at process.processTicksAndRejections (node:internal/process/task_queues:95:5) workbench.web.main.js:642:3592
      Uncaught (in promise) Error: HTTP request failed
      workbench.web.main.js:1584:18500
      

      There were next error message in "Extension Host (Remote)" output just after the start of workspace:

      2023-12-08 19:06:51.501 [error] Error: Cannot get workspace pod. HttpError: HTTP request failed
      	at u.getWorkspacePod (/checode/checode-linux-libc/extensions/che-resource-monitor/dist/extension.js:2:2293889)
      	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      	at async u.getContainersInfo (/checode/checode-linux-libc/extensions/che-resource-monitor/dist/extension.js:2:2293965)
      	at async u.show (/checode/checode-linux-libc/extensions/che-resource-monitor/dist/extension.js:2:2293605)
      

      and then new error message after the Restart workspace command execution:

      2023-12-08 19:10:53.203 [error] HttpError: HTTP request failed
      	at F._callback (/checode/checode-linux-libc/extensions/che-api/dist/extension.js:2:1099563)
      	at t._callback.t.callback.t.callback (/checode/checode-linux-libc/extensions/che-api/dist/extension.js:2:2374487)
      	at F.emit (node:events:517:28)
      	at F.<anonymous> (/checode/checode-linux-libc/extensions/che-api/dist/extension.js:2:2387065)
      	at F.emit (node:events:517:28)
      	at IncomingMessage.<anonymous> (/checode/checode-linux-libc/extensions/che-api/dist/extension.js:2:2385897)
      	at Object.onceWrapper (node:events:631:28)
      	at IncomingMessage.emit (node:events:529:35)
      	at endReadableNT (node:internal/streams/readable:1368:12)
      	at process.processTicksAndRejections (node:internal/process/task_queues:82:21) che-remote.command.stopWorkspace {"value":"eclipse-che.remote","_lower":"eclipse-che.remote"}
      

      Full log: https://gist.github.com/dmytro-ndp/8c183f3274fea27cafbc163c1c1e31d2

      Expected results:

      After the "Dev Spaces: Restart Workspace" command, the workspace should restart successfully.

      After the "Dev Spaces: Restart Workspace from Local Devfile" command, the workspace should fail to restart because of the error "Error creating DevWorkspace deployment: Container tools has state ImagePullBackOff" (because there was "registry.redhat.io/devspaces/udi-rhel8:3.10" in devfile.yaml).

      Reproducibility (Always/Intermittent/Only Once):

      Always.

      Acceptance criteria: 

       
      Definition of Done:

      Build Details:

      VS Code Editor version:

      Version: 1.84.0
      Commit: Unknown
      Date: 2023-11-28T23:37:15.446Z (1 wk ago)
      Browser: Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101 Firefox/107.0
      

      Additional info (Such as Logs, Screenshots, etc):

      "Restart workspace" and "Restart Workspace from Local Devfile" commands worked as expected in online OCP cluster.
       
      Also, the issue hasn't been reproduced in Dev Spaces 3.9.1.

       *

              ivinokur-1 Igor Vinokur
              dnochevn Dmytro Nochevnov
              Dmytro Nochevnov Dmytro Nochevnov
              Jana Vrbkova Jana Vrbkova
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: