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

Deploying/Pushing an updated docker image causes an error because of conflicting resources

    Details

    • Sprint:
      devex #115 May 2016
    • Steps to Reproduce:
      Hide

      0a - clone and import https://github.com/redhat-helloworld-msa/aloha
      0b- in openshift explorer, create a new redhat-helloworld-msa project

      1- perform a maven CLI build
      2- right click on the DockerFile, Run As Docker Image Build, select CDK docker connection, repo name as foo/aloha
      3- right click on redhat-helloworld-msa, Deploy Docker Image...
      4- select push image to registry, go next and finish
      5- image is pushed, 3 resources are created eventually.
      6- app is deployed and accessible online

      Docker update:
      7- change some response in AlohaVerticle
      8- repeat all steps from #1
      => image is pushed but there's an error message popping up about resource conflicts
      => app is still updated properly on openshift

      Show
      0a - clone and import https://github.com/redhat-helloworld-msa/aloha 0b- in openshift explorer, create a new redhat-helloworld-msa project 1- perform a maven CLI build 2- right click on the DockerFile, Run As Docker Image Build, select CDK docker connection, repo name as foo/aloha 3- right click on redhat-helloworld-msa, Deploy Docker Image... 4- select push image to registry, go next and finish 5- image is pushed, 3 resources are created eventually. 6- app is deployed and accessible online Docker update: 7- change some response in AlohaVerticle 8- repeat all steps from #1 => image is pushed but there's an error message popping up about resource conflicts => app is still updated properly on openshift

      Description

      After a docker image has been successfully deployed to OpenShift, if the image has been updated to a new version in the daemon, performing a second Deploy to OpenShift command will effectively update the image but an error will popup about resources already existing.

      I believe that, when we're about to create the openshift resources, we should

      • detect if there's already a matching deployment config for the same project/resource name)
      • if the deployment config links to an imagestream matching the docker image being deployed, then it's an update, then bail without creating any resources, else resource conflict checks should happen.

      Ideally, this should probably happen at the wizard level, so we don't need to show the resource pages and go straight to finish, but that can be implemented later

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jcantrill Jeffrey Cantrill
                  Reporter:
                  fbricon Fred Bricon
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: