Bug 1028152

Summary: Cartridge names including explicit redhat vendor rejected as invalid by broker during app create
Product: OpenShift Online Reporter: Dan Mace <dmace>
Component: MasterAssignee: Clayton Coleman <ccoleman>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.xCC: abhgupta, ccoleman, cpelland, dmcphers
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-07 19:34:01 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 Dan Mace 2013-11-07 19:10:08 UTC
Description of problem:

Cartridge names specified to the REST API for app creation, cartridge addition, etc. now support "fully qualified" identifiers in a `vendor-name-version` format; it's also assumed that when vendor is not specified, `redhat` will be the implied vendor.

By these rules, it should be possible to specify a cartridge whose vendor is explicitly redhat, e.g.:

`rhc app-create phpapp redhat-php-5.3 ...`

However, the broker rejects this cartridge name as invalid/not found:

`SUCCESS ACTION=ADD_APPLICATION USER_ID=527baffa3b4bc01266000001 LOGIN=dmace DOMAIN=dmace Unexpected error: CLIENT_ERROR: No cartridge sources found to install.`

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


How reproducible:

Attempt to create an application with any cartridge whose vendor is redhat.

Steps to Reproduce:
1. `rhc app-create phpapp redhat-php-5.3 ...`

Actual results:

An rhc error: `There are no cartridges that match 'redhat-php-5.3'.`

Expected results:

A new application using the redhat php-5.3 cartridge.

Additional info:

Comment 1 Abhishek Gupta 2013-11-07 19:49:08 UTC
Ideally, we should bump up the REST API version and change the cartridge structure that we send back in the REST response to include separate fields for name, version, and vendor.

Comment 2 Dan Mace 2013-11-11 21:29:23 UTC
Abhishek,

Please also add `cartridge version` to the cartridge elements as part of this in addition to the `software version`, as all four elements are essential to a fully qualified cartridge reference (and on the backend, missing elements are substituted with defaults).

Comment 3 Clayton Coleman 2014-02-07 19:34:01 UTC
This is an intentional change.  We will no longer support the vendor pattern on create.  Names are opaque and must be exact.