Bug 1274160 - Cannot recognize imagestream if current namespace also contains imagestream like project openshift
Cannot recognize imagestream if current namespace also contains imagestream l...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Fabiano Franz
Wei Sun
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-22 03:26 EDT by Wenjing Zheng
Modified: 2016-05-12 13:09 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-12 13:09:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Wenjing Zheng 2015-10-22 03:26:24 EDT
Description of problem:
If there is same imagestream name under user's own project, when create app from imagestream, it cannot recoginize one either from openshift project or its own project. 
Below warning appears
[wzheng@openshiftqe test]$ oc new-app php~https://github.com/wzheng1/php-example-app.git  -p OPCACHE_REVALIDATE_FREQ=0
error: the resolved match "php" for component "php" cannot build source code - check whether this is the image you want to use, then use --strategy=source to build using source or --strategy=docker to treat this as a Docker base image and set up a layered Docker build

[wzheng@openshiftqe test]$ oc get is -n wzheng1
NAME              DOCKER REPO                                                               TAGS          UPDATED
php               $registry/php-56-rhel7          5.6,latest    2 hours ago
[root@openshift-140 ~]# oc get is -n openshift
php                                  registry.access.redhat.com/openshift3/php-55-rhel7               v3.0.1.0,v3.0.0.0,v3.0.2.0 + 2 more...   2 hours ago


Version-Release number of selected component (if applicable):
openshift v1.0.6-833-ga7032bc
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4
etcd 2.1.2
oc v1.0.6-833-ga7032bc

How reproducible:
always

Steps to Reproduce:
1. Make sure there is imagestream created under project openshift
2. Create a project and another imagstream
3. Check which project is using
$oc project
Using project "wzheng1" from context named "wzheng1/openshift-140-lab-eng-nay-redhat-com:8443/wzheng" on server "https://openshift-140.lab.eng.nay.redhat.com:8443".
4. Create app
$ oc new-app php~https://github.com/wzheng1/php-example-app.git  -p OPCACHE_REVALIDATE_FREQ=0

Actual results:
Below warning appears
[wzheng@openshiftqe test]$ oc new-app php~https://github.com/wzheng1/php-example-app.git  -p OPCACHE_REVALIDATE_FREQ=0
error: the resolved match "php" for component "php" cannot build source code - check whether this is the image you want to use, then use --strategy=source to build using source or --strategy=docker to treat this as a Docker base image and set up a layered Docker build

Expected results:
It should use the imagestream under its own project as default.

Additional info:
Comment 1 Fabiano Franz 2016-02-02 14:47:05 EST
Fixed in master, the image stream from current project is now used.
Comment 2 Wang Haoran 2016-02-03 04:57:30 EST
verified with AMI ec2-54-175-214-215.compute-1.amazonaws.com
steps:
1. create imagestream using rhel7 images under openshift namespace
2. create imagestream using centos images under my project
3.  oc new-app php~https://github.com/wzheng1/php-example-app.git  -p OPCACHE_REVALIDATE_FREQ=0  -n <my project>
4. check the build is using my imagestream image.

Note You need to log in before you can comment on or make changes to this bug.