Bug 976682

Summary: Should give a correct prompt for `rhc app create` when web cartridge and addon cartridge are both matched by multiple cartridges
Product: OpenShift Online Reporter: Wei Sun <wsun>
Component: ocAssignee: Clayton Coleman <ccoleman>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 2.x   
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: 2013-07-22 15:17:18 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 Wei Sun 2013-06-21 07:51:22 UTC
Description of problem:
Create an app with addon cartridge with `rhc app create $appname $webcartridge $addon cartridge`,when web cartridge and addon cartridge are both matched by multiple cartridges,this command will return incorrect prompt.
For example,if run `rhc app create phpt php mysql`,it will return "You must select only a single web cartridge. 'mysql' matches web cartridges.".This is not correct,because mysql is not a web cartridge.


Version-Release number of selected component (if applicable):
rhc 1.10.5
INT(devenv_3395)

How reproducible:
Always

Steps to Reproduce:
1.rhc app create phpt php mysql
2.
3.

Actual results:
openshift@openshift-ubuntu:~/test$ rhc app create phpt php mysql
You must select only a single web cartridge. 'mysql' matches web cartridges.


Expected results:
Should give a correct prompt.

Additional info:
1.Only addon cartridge is matched by multiple cartridges,it returns correct prompt
 For example:if run `rhc app create perlt perl mysql`,it will return "There are multiple cartridges matching 'mysql'. Please provide the short name of the correct cart."

2.Only web cartridge is matched by multiple cartridges,t returns correct prompt.
 For example:if run `rhc app create phpt php postgresql`,it will return "There are multiple cartridges matching 'php'. Please provide the short name of the correct cart."

Comment 1 Clayton Coleman 2013-06-21 13:19:24 UTC
It's not correct because mysql matches phpadmin, which is not a web cartridge.

Comment 2 Clayton Coleman 2013-06-21 21:14:31 UTC
Fixed in https://github.com/openshift/rhc/pull/411

Comment 3 Wei Sun 2013-06-24 06:52:41 UTC
Will verify this bug after the pull request is merged.

Comment 4 openshift-github-bot 2013-06-24 15:49:35 UTC
Commit pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/315f3906815efc60eea8f1562385a82eac6a03c2
Bug 976682 - Check for web carts was too aggressive

The logic to figure out which web cart you mean was unnecessary - users need to resolve multiple ambiguous cart specs by themselves.

Comment 5 Wei Sun 2013-06-25 02:20:20 UTC
Verified on INT(devenv_3409),client is rhc 1.10.6

Result:
[sunwei@dhcp-8-229 int]$ rhc app create phpt php mysql
Short Name     Full name
==========     =========
php-5.3        PHP 5.3
phpmyadmin-3.4 phpMyAdmin 3.4
zend-5.6       Zend Server 5.6

There are multiple cartridges matching 'php'. Please provide the short name of the correct cart.