Bug 973351

Summary: rhc cartridge list is displaying dups
Product: OpenShift Online Reporter: Nam Duong <nduong>
Component: ContainersAssignee: Paul Morie <pmorie>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.xCC: bmeng, jofernan, pmorie
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-06-24 14:53: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 Nam Duong 2013-06-11 18:36:28 UTC
Description of problem:
Since the cartridge list is showing duplicates for php and ruby cartridges, I get an error when I try to run:  
> rhc app create wordpress php-5 mysql-5 --from-code=https://github.com/openshift/wordpress-example
Using mysql-5.1 (MySQL Database 5.1) for 'mysql-5'

Short Name Full name
========== =========
php-5.3    PHP 5.3
php-5.3    PHP 5.3


I'm forced to run:
> rhc app create wordpress php-5.3 mysql-5 --from-code=https://github.com/openshift/wordpress-example
Using mysql-5.1 (MySQL Database 5.1) for 'mysql-5'

Application Options
-------------------
  Namespace:   macdomain
  Cartridges:  php-5.3, mysql-5.1
  Source Code: https://github.com/openshift/wordpress-example
  Gear Size:   default
  Scaling:     no


This is confusing users as they're not sure which version of cartridge to use as well as which version will actually get deployed - although the later was validated that we're using v2 (at least for php-5.3).  

Also see "rhc cartridge list"

Comment 1 Paul Morie 2013-06-11 18:39:59 UTC
The root cause here is that the node is reporting both installed versions of the V2 php-5.3 cartridge.

Comment 2 Paul Morie 2013-06-11 22:02:54 UTC
I've made a quick fix for this and put in PRs for stage and master.  I am leaving this issue in modified because we need to discuss whether the quick fix is good enough.

Comment 3 openshift-github-bot 2013-06-12 02:57:36 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/f8c67f8ef2a33bd1d82793222886514cb0c54f4f
Fix bug 973351: Add CartridgeRepository.latest_versions for use in rhc cartridge list

Comment 4 Meng Bo 2013-06-13 10:37:40 UTC
Checked on devenv_3355,

1.Toggle the cartridge version between v1 and v2.
2.Create app with fuzzy short name.
rhc app create php1 php-5 -pxx

3. App creation successfully.

Move bug to verified.