Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1611462

Summary: oc new-app with --image-stream failed with error info
Product: OpenShift Container Platform Reporter: Yanping Zhang <yanpzhan>
Component: ocAssignee: Corey Daley <cdaley>
Status: CLOSED ERRATA QA Contact: Xingxing Xia <xxia>
Severity: high Docs Contact:
Priority: medium    
Version: 3.11.0CC: aos-bugs, bparees, jokerman, maschmid, mmccomas, xiuwang
Target Milestone: ---Keywords: Regression
Target Release: 3.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-11 07:23:07 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 Yanping Zhang 2018-08-02 09:13:23 UTC
Description of problem:
Create app using oc new-app with --image-stream option, it failed with error

Version-Release number of selected component (if applicable):
oc v3.11.0-0.10.0
openshift v3.11.0-0.10.0
kubernetes v1.11.0+d4cacc

regression, works in oc v3.11.0-0.9.0

How reproducible:
Always

Steps to Reproduce:
1.Create app from oc with --image-stream option.
$ oc new-app --name=mytest --image-stream=mysql --env=MYSQL_USER=test --env=MYSQL_PASSWORD=redhat --env=MYSQL_DATABASE=testdb -n protest
2.
3.

Actual results:
1. Failed with error info, it wanted to create imagestream in openshift namespace:
 $ oc new-app --name=mytest --image-stream=mysql --env=MYSQL_USER=test --env=MYSQL_PASSWORD=redhat --env=MYSQL_DATABASE=testdb -n protest
--> Found image e6d3b44 (2 weeks old) in image stream "openshift/mysql" under tag "5.7" for "mysql"

    MySQL 5.7 
    --------- 
    MySQL is a multi-user, multi-threaded SQL database server. The container image provides a containerized packaging of the MySQL mysqld daemon and client application. The mysqld server daemon accepts connections from clients and provides access to content from MySQL databases on behalf of the clients.

    Tags: database, mysql, mysql57, rh-mysql57

    * This image will be deployed in deployment config "mytest"
    * Port 3306/tcp will be load balanced by service "mytest"
      * Other containers can access this service through the hostname "mytest"

--> Creating resources ...
    error: imagestreamtags.image.openshift.io is forbidden: User "yanpzhan" cannot create imagestreamtags.image.openshift.io in the namespace "openshift": User "yanpzhan" cannot create imagestreamtags.image.openshift.io in project "openshift"
    deploymentconfig.apps.openshift.io "mytest" created
    service "mytest" created
--> Failed


Expected results:
1.Imagestream should not be created in openshift namespace.

Additional info:

Comment 1 Juan Vallejo 2018-08-02 14:27:52 UTC
Re-assigning to Ben.

Comment 2 Ben Parees 2018-08-02 15:12:50 UTC
Corey, urgent for 3.11.

Comment 3 Corey Daley 2018-08-20 12:56:19 UTC
Submitted pull request for this issue: https://github.com/openshift/origin/pull/20666

Comment 4 Corey Daley 2018-08-23 02:23:42 UTC
Pull request has been merged.

Comment 6 Yanping Zhang 2018-08-23 10:26:04 UTC
oc v3.11.0-0.20.0
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO
Checked with oc v3.11.0-0.20.0.
Steps to verified:
1.$ oc new-app --name=mytest --image-stream=mysql --env=MYSQL_USER=test --env=MYSQL_PASSWORD=redhat --env=MYSQL_DATABASE=testdb
--> Found image bc11631 (8 days old) in image stream "openshift/mysql" under tag "5.7" for "mysql"

    MySQL 5.7 
    --------- 
    MySQL is a multi-user, multi-threaded SQL database server. The container image provides a containerized packaging of the MySQL mysqld daemon and client application. The mysqld server daemon accepts connections from clients and provides access to content from MySQL databases on behalf of the clients.

    Tags: database, mysql, mysql57, rh-mysql57

    * This image will be deployed in deployment config "mytest"
    * Port 3306/tcp will be load balanced by service "mytest"
      * Other containers can access this service through the hostname "mytest"

--> Creating resources ...
    imagestreamtag.image.openshift.io "mytest:5.7" created
    deploymentconfig.apps.openshift.io "mytest" created
    service "mytest" created
--> Success
    Application is not exposed. You can expose services to the outside world by executing one or more of the commands below:
     'oc expose svc/mytest' 
    Run 'oc status' to view your app.
2.$ oc get pod
NAME             READY     STATUS    RESTARTS   AGE
mytest-1-7b65v   1/1       Running   0          1m

The bug has been fixed, so move it to Verified.

Comment 8 errata-xmlrpc 2018-10-11 07:23:07 UTC
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:2652