Red Hat Bugzilla – Bug 1611462
oc new-app with --image-stream failed with error info
Last modified: 2018-10-11 03:23:41 EDT
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:
Re-assigning to Ben.
Corey, urgent for 3.11.
Submitted pull request for this issue: https://github.com/openshift/origin/pull/20666
Pull request has been merged.
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.
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