Bug 1244254

Summary: Cannot create from templates with certain types in the Web Console
Product: OpenShift Container Platform Reporter: Samuel Padgett <spadgett>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED ERRATA QA Contact: Yanping Zhang <yanpzhan>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.0.0CC: adellape, jokerman, libra-bugs, libra-onpremise-devel, mmccomas, pruan, sdodson
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: openshift-3.0.1.0-0.git.336.73858fa.el7ose Doc Type: Bug Fix
Doc Text:
Previously when creating from templates in the web console, the creation would fail if the template contained certain API object types, including persistent volume claims, secrets, and service accounts. This was due to the web console missing these types from its API type map. The type map has now been updated to include these missing types, and the web console also now gracefully handles unrecognized object types, reporting a relevant error message.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-03 20:17:40 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 Samuel Padgett 2015-07-17 15:11:12 UTC
Description of problem:

You cannot use a template that references several different types in the Web Console. Examples include persistent volume claims, secrets, service accounts, and many others.

See

https://github.com/openshift/origin/issues/3722
https://github.com/openshift/origin/pull/3746

Version-Release number of selected component (if applicable):

3.0

How reproducible:

Always

Steps to Reproduce:
1. Load a template that uses persistent volume claims, like examples/db-templates/postgresql-persistent-template.json
2. Try to create using the template in the Web Console

Actual results:

The creation fails with no error message.

Expected results:

The creation succeeds.

Additional info:

We should also fail gracefully when templates reference unrecognized types. (To test, change the kind of an object in a template to an invalid value.)

Comment 1 Samuel Padgett 2015-07-17 15:12:14 UTC
Fix merged in origin:

https://github.com/openshift/origin/pull/3746

Comment 4 Yanping Zhang 2015-07-22 08:06:00 UTC
Test on ose puddle 2015-07-21.3.
$ oc version
oc v3.0.1.0-388-g51e9da7
kubernetes v1.0.0

Steps to verify:
1.Create template in project "prozyp".
$ oc create -f origin/examples/db-templates/postgresql-persistent-template.json -n prozyp
2.Login web console, create using template postgresql-persistent in project "prozyp".
3.Create template in project "prozyp1". Edit the template, and chage the kind "PersistentVolumeClaim" to an invalid type "TestPersistentVolumeClaim".
$ oc create -f origin/examples/db-templates/postgresql-persistent-template.json -n prozyp1
$ oc edit templates/postgresql-persistent -n prozyp1
4.Login web console, create using template postgresql-persistent in project "prozyp1".

Actual results:
2.Show successful creation info on Overview page.
4.Show failure info, and in details there is error info: Cannot create object. Unrecognized type: TestPersistentVolumeClaim.

Comment 6 errata-xmlrpc 2015-08-03 20:17:40 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-2015:1540