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

Workspace crashes when executing pip install in terminal

    XMLWordPrintable

Details

    • False
    • None
    • False
    • Hide
      1. Start a Python workspace (e.g. the one below)
      2. Open a terminal in the python container
      3. Run  pip3 --timeout=180 install torch
      4. Open another terminal in the python container
      5. Run  {{pip3 --timeout=180 install torch }} again
      6. Websocket error appears because workspace pod crashes

      You can use the following DevFile based on the standard Python template to reproduce:
       

      schemaVersion: 2.1.0
      metadata:
        name: python-hello-world
        namespace: bschmeli-redhat-com-devspaces-7t9v6h
      projects:
        - name: python-hello-world
          zip:
            location: 'http://<devfile-registry-svc>:8080/resources/v2/python-hello-world.zip'
      components:
        - container:
            args:
              - sh
              - '-c'
              - '${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}'
            env:
              - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE
                value: /remote-endpoint/plugin-remote-endpoint
              - name: THEIA_PLUGINS
                value: 'local-dir:///plugins/sidecars/python'
              - name: CHE_DASHBOARD_URL
                value: 'https://<dashboard-url>'
              - name: CHE_PLUGIN_REGISTRY_URL
                value: 'https://<dashboard-url>/plugin-registry/v3'
              - name: CHE_PLUGIN_REGISTRY_INTERNAL_URL
                value: 'http://<plugin-registry-svc>:8080/v3'
            image: 'registry.redhat.io/devspaces/udi-rhel8@sha256:aed2d0df14feebbc5536c4f66184bb9cdcc7c1177351708467fa64f69c8d6e40'
            memoryLimit: 4G
            mountSources: true
            sourceMapping: /projects
            volumeMounts:
              - name: venv
                path: /home/user/.venv
              - name: remote-endpoint
                path: /remote-endpoint
              - name: plugins
                path: /plugins
          name: python
        - name: venv
          volume:
            size: 10G
      commands:
        - exec:
            commandLine: python -m venv .venv && . .venv/bin/activate && python hello-world.py
            component: python
            group:
              kind: run
            label: Run the application
            workingDir: '${PROJECTS_ROOT}/python-hello-world'
          id: run
        - exec:
            commandLine: pip3 --timeout=180 install torch
            component: python
            group:
              kind: run
            label: Run the application
            workingDir: '${PROJECTS_ROOT}/python-hello-world'
          id: install-torch
      Show
      Start a Python workspace (e.g. the one below) Open a terminal in the python container Run  pip3 --timeout=180 install torch Open another terminal in the python container Run  {{pip3 --timeout=180 install torch }} again Websocket error appears because workspace pod crashes You can use the following DevFile based on the standard Python template to reproduce:   schemaVersion: 2.1.0 metadata: name: python-hello-world namespace: bschmeli-redhat-com-devspaces-7t9v6h projects: - name: python-hello-world zip: location: 'http: //<devfile-registry-svc>:8080/resources/v2/python-hello-world.zip' components: - container: args: - sh - '-c' - '${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}' env: - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint - name: THEIA_PLUGINS value: 'local-dir: ///plugins/sidecars/python' - name: CHE_DASHBOARD_URL value: 'https: //<dashboard-url>' - name: CHE_PLUGIN_REGISTRY_URL value: 'https: //<dashboard-url>/plugin-registry/v3' - name: CHE_PLUGIN_REGISTRY_INTERNAL_URL value: 'http: //<plugin-registry-svc>:8080/v3' image: 'registry.redhat.io/devspaces/udi-rhel8@sha256:aed2d0df14feebbc5536c4f66184bb9cdcc7c1177351708467fa64f69c8d6e40' memoryLimit: 4G mountSources: true sourceMapping: /projects volumeMounts: - name: venv path: /home/user/.venv - name: remote-endpoint path: /remote-endpoint - name: plugins path: /plugins name: python - name: venv volume: size: 10G commands: - exec: commandLine: python -m venv .venv && . .venv/bin/activate && python hello-world.py component: python group: kind: run label: Run the application workingDir: '${PROJECTS_ROOT}/python-hello-world' id: run - exec: commandLine: pip3 --timeout=180 install torch component: python group: kind: run label: Run the application workingDir: '${PROJECTS_ROOT}/python-hello-world' id: install-torch

    Description

      When you run a process such as pip3 --timeout=180 install torch from the terminal in the python container the progress of the tasks freezes after a few seconds. When you open a new terminal and run the same command again, the whole workspace pod crashes.

      If you run the same process as a command defined in the devfile the pods does not crash but it freezes, too.
       

      Attachments

        Activity

          People

            vsvydenk Valerii Svydenko
            bschmeli Benjamin Schmeling
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: