Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-21731

Server Adapter: Error shown when image is not created/pushed yet, should be more user friendly

    XMLWordPrintable

Details

    • Hide
      1. EXEC: create a new application via a template
      2. EXEC: open up "Servers view", hit "New > Server"
      3. EXEC: Select "OpenShift/OpenShift 3"
      4. ASSERT: after "Next" Connection page shows up,
      5. EXEC: select your connection and "Next"

      Result:
      You get the following error:

      Show
      EXEC: create a new application via a template EXEC: open up "Servers view", hit "New > Server" EXEC: Select "OpenShift/OpenShift 3" ASSERT: after "Next" Connection page shows up, EXEC: select your connection and "Next" Result: You get the following error:
    • Workaround Exists
    • Hide
      1. EXEC: in "OpenShift Explorer" unfold your connection, project ("test"), service ("eap-app"). In Open Properties view, select tab "Builds"
      2. ASSERT: in "Builds" you have a build in Status "Running"
      3. EXEC: wait for the build to finish
      4. ASSERT: build gets to Status "Complete"
      5. EXEC: select "Pods" tab
      6. ASSERT: you see an "eap-app-XXX-build" in state "Succeeded" and now a new pod "eap-app-XX-YYY" in state "Running"
      Show
      EXEC: in "OpenShift Explorer" unfold your connection, project ("test"), service ("eap-app"). In Open Properties view, select tab "Builds" ASSERT: in "Builds" you have a build in Status "Running" EXEC: wait for the build to finish ASSERT: build gets to Status "Complete" EXEC: select "Pods" tab ASSERT: you see an "eap-app-XXX-build" in state "Succeeded" and now a new pod "eap-app-XX-YYY" in state "Running"

    Description

      When I create a new OS3 application and then I want to create a new server adapter, an image for this application has to be built and pushed to OpenShift's local image registry. If build is still running, what is often happening on internal OSE instance (it takes minutes - pushing of images), then there is an error message that loading of image failed. User without solid overview of OS3 background would not be able to figure out why it is happening, because even Image stream is shown, but the image is not there yet.

      Full error log:

      com.openshift.restclient.OpenShiftException: Could not get resource django-example:latest in namespace image: {
        "kind": "Status",
        "apiVersion": "v1",
        "metadata": {},
        "status": "Failure",
        "message": "imageStreamTag \"django-example:latest\" not found",
        "reason": "NotFound",
        "details": {
          "name": "django-example:latest",
          "kind": "imageStreamTag"
        },
        "code": 404
      }
      
      	at com.openshift.internal.restclient.DefaultClient.createOpenShiftException(DefaultClient.java:481)
      	at com.openshift.internal.restclient.DefaultClient.get(DefaultClient.java:306)
      	at org.jboss.tools.openshift.core.connection.Connection.getResource(Connection.java:378)
      	at org.jboss.tools.openshift.internal.ui.models.DeploymentResourceMapper.lambda$5(DeploymentResourceMapper.java:106)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1540)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
      	at org.jboss.tools.openshift.internal.ui.models.DeploymentResourceMapper.getImageStreamTagsFor(DeploymentResourceMapper.java:107)
      	at org.jboss.tools.openshift.internal.ui.models.DeploymentResourceMapper.lambda$2(DeploymentResourceMapper.java:87)
      	at java.util.stream.Collectors.lambda$toMap$213(Collectors.java:1321)
      	at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
      	at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1540)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
      	at org.jboss.tools.openshift.internal.ui.models.DeploymentResourceMapper.getAllImageStreamTags(DeploymentResourceMapper.java:85)
      	at org.jboss.tools.openshift.internal.ui.server.ServerSettingsViewModel$ProjectImageStreamTags.createImageStreamsMap(ServerSettingsViewModel.java:334)
      	at org.jboss.tools.openshift.internal.ui.server.ServerSettingsViewModel$ProjectImageStreamTags.<init>(ServerSettingsViewModel.java:327)
      	at org.jboss.tools.openshift.internal.ui.server.ServerSettingsViewModel.lambda$1(ServerSettingsViewModel.java:279)
      	at java.util.stream.Collectors.lambda$toMap$213(Collectors.java:1321)
      	at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
      	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
      	at org.jboss.tools.openshift.internal.ui.server.ServerSettingsViewModel.createImageStreamTagsMap(ServerSettingsViewModel.java:277)
      	at org.jboss.tools.openshift.internal.ui.server.ServerSettingsViewModel.loadResources(ServerSettingsViewModel.java:261)
      	at org.jboss.tools.openshift.internal.ui.server.ServerSettingsViewModel.loadResources(ServerSettingsViewModel.java:255)
      	at org.jboss.tools.openshift.internal.ui.server.ServerSettingsWizardFragment$15.run(ServerSettingsWizardFragment.java:695)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
      Caused by: com.openshift.internal.restclient.http.NotFoundException: {
        "kind": "Status",
        "apiVersion": "v1",
        "metadata": {},
        "status": "Failure",
        "message": "imageStreamTag \"django-example:latest\" not found",
        "reason": "NotFound",
        "details": {
          "name": "django-example:latest",
          "kind": "imageStreamTag"
        },
        "code": 404
      }
      
      	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:230)
      	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:165)
      	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:141)
      	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.get(UrlConnectionHttpClient.java:103)
      	at com.openshift.internal.restclient.DefaultClient.get(DefaultClient.java:302)
      	... 36 more
      Caused by: java.io.FileNotFoundException: https://console.engint.openshift.com/oapi/v1/namespaces/image/imagestreamtags/django-example:latest
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1836)
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
      	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
      	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:161)
      	... 39 more
      
      

      Attachments

        Issue Links

          Activity

            People

              adietish@redhat.com André Dietisheim
              mlabuda_jira Marián Labuda (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: