Bug 976682 - Should give a correct prompt for `rhc app create` when web cartridge and addon cartridge are both matched by multiple cartridges
Should give a correct prompt for `rhc app create` when web cartridge and addo...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Clayton Coleman
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-21 03:51 EDT by Wei Sun
Modified: 2015-05-14 22:23 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-22 11:17:18 EDT
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 Wei Sun 2013-06-21 03:51:22 EDT
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 09:19:24 EDT
It's not correct because mysql matches phpadmin, which is not a web cartridge.
Comment 2 Clayton Coleman 2013-06-21 17:14:31 EDT
Fixed in https://github.com/openshift/rhc/pull/411
Comment 3 Wei Sun 2013-06-24 02:52:41 EDT
Will verify this bug after the pull request is merged.
Comment 4 openshift-github-bot 2013-06-24 11:49:35 EDT
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-24 22:20:20 EDT
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.

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