Bug 1248362 - Users should be able to specify which template/image stream to use when there are templates/image stream with same name in openshift project and user's project.
Users should be able to specify which template/image stream to use when there...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.x
Unspecified Unspecified
low Severity medium
: ---
: ---
Assigned To: Fabiano Franz
Xingxing Xia
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-30 03:36 EDT by Yanping Zhang
Modified: 2016-12-09 16:51 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-09 16:51:56 EST
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 Yanping Zhang 2015-07-30 03:36:23 EDT
Description of problem:
When there are templates/image stream with same name in openshift project and user's project, and try to create app using oc new-app with template/image stream. It will use template/image stream in user's project by default, and user can not specify to use template/is in openshift project. 

Version-Release number of selected component (if applicable):
# oc version
oc v1.0.4-14-gc619c36
kubernetes v1.0.0


How reproducible:
Always

Steps to Reproduce:
1.Create templates with same name in openshift project and user's project.
2.Search templates that can be used in user's project.
$oc new-app --search --template=mongodb -n protest
Templates (oc new-app --template=<template>)
-----
mongodb-ephemeral
  Project: protest
  MySQL database service, without persistent storage. WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing
mongodb-ephemeral
  Project: openshift
  MongoDB database service, without persistent storage. WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing
3.Create app from template
# oc new-app --template=mongodb -n protest

Actual results:
3.Using template in user's project:
# oc new-app --template=mongodb -n protest
services/mysql
deploymentconfigs/mysql
Service "mysql" created at 172.30.40.190 with port mappings 3306.
Run 'oc status' to view your app.

Expected results:
3.User should be able to specify to use template in openshift project when use "oc new-app --template"

Additional info:
On web console, if create app in project "protest", user can choose to use templatea/image streams from openshift project or user's project.
Comment 1 Fabiano Franz 2016-07-27 09:07:29 EDT
Fixed in https://github.com/openshift/origin/pull/10026.
Comment 2 Yanping Zhang 2016-07-28 04:42:35 EDT
oc v1.3.0-alpha.2+75fce88
kubernetes v1.3.0+57fb9ac
Tested on devenv-rhel7_4691.
1.Create templates with same name in openshift project and user's project.
2.Search templates that can be used in user's project.
# oc new-app -S --template=rubyTemplates (oc new-app --template=<template>)
-----
ruby-helloworld-sample
  Project: prozyp
  This example shows how to create a simple ruby application in openshift origin v3
ruby-helloworld-sample
  Project: openshift
  This example shows how to create a simple ruby application in openshift origin v3
3.Create app choosing template:
# oc new-app --template=prozyp/ruby-helloworld-sample
--> Deploying template ruby-helloworld-sample for "prozyp/ruby-helloworld-sample"

     ruby-helloworld-sample
     ---------
     This example shows how to create a simple ruby application in openshift origin v3

     * With parameters:
        * ADMIN_USERNAME=admin13R # generated
        * ADMIN_PASSWORD=AioOIreI # generated
        * MYSQL_USER=user1S0 # generated
        * MYSQL_PASSWORD=ddgEQDOG # generated
        * MYSQL_DATABASE=root

--> Creating resources with label app=ruby-sample-build ...
    service "frontend" created
    route "route-edge" created
    imagestream "origin-ruby-sample" created
    imagestream "ruby-22-centos7" created
    buildconfig "ruby-sample-build" created
    deploymentconfig "frontend" created
    service "database" created
    deploymentconfig "database" created
--> Success
    Build scheduled, use 'oc logs -f bc/ruby-sample-build' to track its progress.
    Run 'oc status' to view your app.

Now user could choose template when create app. The bug has been fixed, so move it to Verified.

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