Bug 1419801
| Summary: | 'new-app' and 'new-build' should tolerate adding a tag to the existing imagestream | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | XiuJuan Wang <xiuwang> |
| Component: | Build | Assignee: | Gabe Montero <gmontero> |
| Status: | CLOSED ERRATA | QA Contact: | XiuJuan Wang <xiuwang> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.5.0 | CC: | ansverma, aos-bugs, bparees, jokerman, mmccomas |
| Target Milestone: | --- | ||
| Target Release: | 3.8.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause: oc new-app/new-build code did not honor existing images streams when generating the list of objects to be created as part of processing a template; also, as part of processing input and output images, stack overflows as a result of circular references were possibly
Consequence: Either imagestream already exists or stack overflow errors would occur on `oc new-app` or `oc new-build`
Fix: code changes to the `oc new-app/new-build` paths were updated to looks for existing images streams and better deal with circular references
Result: oc new-app/new-build work as expected.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-03-28 14:05:01 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
XiuJuan Wang
2017-02-07 05:47:57 UTC
work in progress PR for this: https://github.com/openshift/origin/pull/13848 Gabe, the above PR got this pretty far along but has probably bit-rotted, you may just want to review it to get an idea of the direction Ryan was headed in with it. The general idea is that if new-app is going to create an imagestream name that already exists, it should instead just create a tag within that imagestream. Ben - first, just noting I had to change the repro steps here slightly to see anything like this, and still have a few questions. 1) If I literally tried `oc new-app ruby-ex:2.0 https://github.com/openshift/ruby-ex.git` I got: error: Errors occurred while determining argument types: ruby-ex:2.0 as a Git repository URL: ssh: Could not resolve hostname ruby-ex: Name or service not known fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ruby-ex:2.0 as a local directory pointing to a Git repository: stat ruby-ex:2.0: no such file or directory Errors occurred during resource creation: error: no match for "ruby-ex:2.0" 2) thinking the images streams might have changed names, I then ran `oc new-app --list` and saw this for ruby: ruby Project: openshift Tags: 2.2, 2.3, 2.4, latest so I switched to `oc new-app ruby:2.2 https://github.com/openshift/ruby-ex.git` and that worked successfully. 3) I then tried `oc new-app ruby:2.3 https://github.com/openshift/ruby-ex.git` and it complained about ruby-ex existing. Questions: a) is this the intended flow? ... the PR also denotes a slightly different permutation, though I think it results in the same root cause/effect b) the new-app in 3) also complained about duplicate buildconfigs. deploymentconfigs, and services ... I saw some discussion of this with Clayton in the PR, but am not sure I saw a consensus reached ... where do you want the initial stake in the new PR to be? ... more general/holistic, or image specific? a) yes. I think the recreate may have left out a step, or used the wrong name, but your recreate shows the issue. b) image specific. Namely, that if the imagestreamtag we are about to try to create, already exists and points to the same place as the one we are about to try to create, then it's ok not to create it. And if the imagestream exists, but not the tag, it's ok to create the tag within the imagestream instead of failing because we can't create the imagestream. The critical problem to solve here is the one described in https://github.com/openshift/origin/issues/13169 Quick update: the PR has been marked for merge, just waiting for the 3.7 induced lockdown of openshit/origin:master to be lifted. PR merged .... moving to modified 1.Create a is $oc import-image ruby-ex:test --from='openshift/ruby-22-centos7' --confirm 2.Create app which will create above same is $oc new-app ruby:2.3 https://github.com/openshift/ruby-ex.git or $oc new-build ruby:2.3 https://github.com/openshift/ruby-ex.git same imagestream with different tag will be create successfully 3.Check is oc get is NAME DOCKER REPO TAGS UPDATED ruby-ex docker-registry.default.svc:5000/xiu1/ruby-ex latest,test 18 seconds ago Verified this bug in openshift cluster & client v3.9.0-0.9.0 The fix has been verified by QE and is currently targeted for the 3.9 release. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0489 |