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

"Java-fuse" workspace migrated from CRW 2.15 to DS 3.0 failed to start due 'is invalid: spec.template.spec.containers[2].ports[0].name: Invalid value: "8080"'

    XMLWordPrintable

Details

    • False
    • None
    • False
    • Hide
      = Converted *Red Hat Fuse* workspaces fail to start

      Currently, workspaces with *Red Hat Fuse* devfile v1 fail to start after conversion to devfile v2 by clicking the *Convert* button in the {prod-short} dashboard.

      .Workaround

      pass:[<!-- vale RedHat.Spelling = NO -->]


      . Edit the devfile in the editor in the dashboard page. If the editor in the dashboard page is disabled, copy the devfile contents to a new `devfile.yaml` file.
      . In the devfile, rename the endpoint for the target port 8080 to `name: port8080`.
      . Commit to a Git repository.
      . Start a new workspace from the edited devfile by using one of the following options:
      ** The factory URL, using the `?new` URL parameter for starting a duplicate workspace:
      +
      [source,subs="+quotes,+attributes,+macros"]
      ----
      pass:c,a,q[{prod-url}]#__<git_repository_url>__?new
      ----
      ** Go to menu:Dashboard[Create Workspace > Quick Add > Import from Git > Git Repo URL* Enter Git URL > Create & Open].
      Show
      = Converted *Red Hat Fuse* workspaces fail to start Currently, workspaces with *Red Hat Fuse* devfile v1 fail to start after conversion to devfile v2 by clicking the *Convert* button in the {prod-short} dashboard. .Workaround pass:[<!-- vale RedHat.Spelling = NO -->] . Edit the devfile in the editor in the dashboard page. If the editor in the dashboard page is disabled, copy the devfile contents to a new `devfile.yaml` file. . In the devfile, rename the endpoint for the target port 8080 to `name: port8080`. . Commit to a Git repository. . Start a new workspace from the edited devfile by using one of the following options: ** The factory URL, using the `?new` URL parameter for starting a duplicate workspace: + [source,subs="+quotes,+attributes,+macros"] ---- pass:c,a,q[{prod-url}]#__<git_repository_url>__?new ---- ** Go to menu:Dashboard[Create Workspace > Quick Add > Import from Git > Git Repo URL* Enter Git URL > Create & Open].
    • Documented as Known Issue
    • Workaround Exists
    • Hide
      Show
      x86_64 OCP 4.10 cluster (online) deploy CRW 2.15.4 run 'java-fuse' workspace migrate CRW 2.15.4 to DS 3.0.0 used doc --> https://docs.google.com/document/d/1ULhYihATldFQxznf7deSKBsHHmhtajdwG_E-MeRv3es/edit#heading=h.kzsjguxjvmh login to DS 3.0.0 convert 'java-fuse' from v1 to v2 on Dashboard run 'java-fuse' ws

    Description

      • 'java-fuse' workspace migrated from CRW 2.1.4 to DS 3.0.0 RC-06-03 is failed to start due:
      Deployment.apps "workspaceck1afbwqsef68b8l" is invalid: spec.template.spec.containers[2].ports[0].name: Invalid value: "8080": must contain at least one letter or number (a-z, 0-9)
      
      • converted 'java-fuse' v2 devfile:
      schemaVersion: 2.1.0
      metadata:
        name: java-fuse-tm4u
        namespace: admin-codeready
      projects:
        - name: java-fuse
          zip:
            location: 'http://devfile-registry.openshift-workspaces.svc:8080/resources/java-fuse-java-fuse-redhat-crw.zip'
      components:
        - attributes:
            app.kubernetes.io/name: maven
            che-theia.eclipse.org/vscode-extensions:
              - 'http://plugin-registry.openshift-workspaces.svc:8080/resources/github_com/redhat-developer/devspaces-vscode-extensions/releases/download/7_44-che-assets/java-0.63.0-2222.vsix'
              - 'http://plugin-registry.openshift-workspaces.svc:8080/resources/github_com/redhat-developer/devspaces-vscode-extensions/releases/download/7_44-che-assets/vscode-apache-camel-0.1.5-1377.vsix'
              - 'http://plugin-registry.openshift-workspaces.svc:8080/resources/github_com/fabric8-analytics/fabric8-analytics-vscode-extension/releases/download/0_2_1/fabric8-analytics-0.2.1.vsix'
              - 'http://plugin-registry.openshift-workspaces.svc:8080/resources/github_com/redhat-developer/devspaces-vscode-extensions/releases/download/7_44-che-assets/vscode-java-debug-0.26.0.vsix'
              - 'http://plugin-registry.openshift-workspaces.svc:8080/resources/open-vsx_org/api/vscjava/vscode-java-test/0_28_1/file/vscjava.vscode-java-test-0.28.1.vsix'
              - 'http://plugin-registry.openshift-workspaces.svc:8080/resources/github_com/redhat-developer/devspaces-vscode-extensions/releases/download/7_44-che-assets/java-0.82.0-369.vsix'
            che-theia.eclipse.org/vscode-preferences:
              java.server.launchMode: Standard
          container:
            args:
              - sh
              - '-c'
              - '${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}'
            endpoints:
              - exposure: public
                name: '8080'
                protocol: http
                targetPort: 8080
              - attributes:
                  public: 'false'
                exposure: internal
                name: debug
                protocol: http
                targetPort: 5005
            env:
              - name: JAVA_OPTS
                value: '-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom -Duser.home=/home/jboss'
              - name: MAVEN_OPTS
                value: $(JAVA_OPTS)
              - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE
                value: /remote-endpoint/plugin-remote-endpoint
              - name: THEIA_PLUGINS
                value: 'local-dir:///plugins/sidecars/maven'
              - name: CHE_DASHBOARD_URL
                value: 'https://devspaces-openshift-workspaces.apps.ocp410-oshmara.crw-qe.com'
              - name: CHE_PLUGIN_REGISTRY_URL
                value: 'https://devspaces-openshift-workspaces.apps.ocp410-oshmara.crw-qe.com/plugin-registry/v3'
              - name: CHE_PLUGIN_REGISTRY_INTERNAL_URL
                value: 'http://plugin-registry.openshift-workspaces.svc:8080/v3'
            image: 'registry.redhat.io/codeready-workspaces/plugin-java8-rhel8@sha256:2a62b1a38012287fab26dd625b846420e8ae1604ec6f64d3518e9783ced72e85'
            memoryLimit: 768Mi
            mountSources: true
            sourceMapping: /projects
            volumeMounts:
              - name: m2
                path: /home/jboss/.m2
              - name: remote-endpoint
                path: /remote-endpoint
              - name: plugins
                path: /plugins
          name: maven
        - name: m2
          volume: {}
      commands:
        - exec:
            commandLine: mvn clean package
            component: maven
            label: 1. Build
            workingDir: '${PROJECTS_ROOT}/java-fuse'
          id: build
        - exec:
            commandLine: 'mvn spring-boot:run'
            component: maven
            label: 2. Run
            workingDir: '${PROJECTS_ROOT}/java-fuse'
          id: run
        - exec:
            commandLine: 'mvn spring-boot:run -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"'
            component: maven
            label: 3. Run in debug mode
            workingDir: '${PROJECTS_ROOT}/java-fuse'
          id: run-in-debug-mode
        - exec:
            commandLine: |
              echo
              echo "Before you can deploy this application to an openshift cluster,"
              echo "you must run 'oc login ...' in the maven terminal."
              echo
            component: maven
            label: 4. Log into deployment cluster
            workingDir: '${PROJECTS_ROOT}/java-fuse'
          id: log-into-deployment-cluster
        - exec:
            commandLine: 'mvn fabric8:deploy -Popenshift -DskipTests'
            component: maven
            label: 5. Deploy to OpenShift
            workingDir: '${PROJECTS_ROOT}/java-fuse'
          id: deploy-to-openshift
      
      

      Attachments

        1. image-2022-06-13-12-56-52-668.png
          19 kB
          Nick Boldt
        2. java-fuse-convert-fail-start.png
          74 kB
          Shmaraiev Oleksandr
        3. java-fuse-convert-run-fail.png
          88 kB
          Shmaraiev Oleksandr
        4. migrate-java-fuse-edit-ws-run.png
          200 kB
          Shmaraiev Oleksandr

        Issue Links

          Activity

            People

              rhn-support-mleonov Max Leonov
              oshmarai Shmaraiev Oleksandr
              Max Leonov Max Leonov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: