Bug 994986 - 'rhc cartridges --help' shows inconsistent help doc on RHEL-6
Summary: 'rhc cartridges --help' shows inconsistent help doc on RHEL-6
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
: ---
Assignee: Clayton Coleman
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-08 10:48 UTC by Lei Zhang
Modified: 2015-05-15 02:24 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-29 12:50:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Lei Zhang 2013-08-08 10:48:54 UTC
Description of problem:
Run command 'rhc cartridges --help' and check the help doc, repeat at least five times, found 'rhc cartridges --help' sometimes show 'rhc cartridge-list' help doc,sometimes show 'rhc cartridge' help doc

[rayzhang@rayzhang Work]$ rhc cartridges --help
Usage: rhc cartridge-list 
.................................
.................................
.................................
The default action for this resource is 'list'


[rayzhang@rayzhang Work]$ rhc cartridges --help
Usage: rhc cartridge <action>
.................................
.................................
.................................
  See 'rhc help options' for a full list of global options.
List of Actions
  list          List available cartridges
  add           Add a cartridge to your application
  remove        Remove a cartridge from your application
  start         Start a cartridge
  restart       Restart a cartridge
  show          Show useful information about a cartridge
  storage       View/manipulate storage on a cartridge
  reload        Reload the cartridge's configuration
  stop          Stop a cartridge
  status        Get current the status of a cartridge
  scale         Set the scale range for a cartridge

Version-Release number of selected component (if applicable):
devenv_3627
rhc-1.13.0
RHEL-6.4\RHEL-6.3
ruby 1.8.7

How reproducible:
20%

Steps to Reproduce:
1.run 'rhc cartridges --help' 
2.check what help doc shows  
3.repeat Step 1 and Step 2 at least 5 times

Actual results:
'rhc cartridges --help' sometimes show 'rhc cartridge-list' help doc, sometimes show 'rhc cartridge' help doc.

Expected results:
'rhc cartridges --help' should not show different help doc

Additional info:

Comment 1 Clayton Coleman 2013-08-20 17:23:35 UTC
Ruby 1.8.7 doesn't order hashes, which meant that sometimes the processing order of the "rhc cartridge" alias for "rhc cartridge list" got processed early.  

I'm going to remove "rhc cartridge" as an alias to make it consistent with the rest of the commands.

Comment 2 Clayton Coleman 2013-08-20 17:52:18 UTC
Fixed in https://github.com/openshift/rhc/pull/441

Comment 3 openshift-github-bot 2013-08-21 15:22:37 UTC
Commit pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/323575553c2f7667985a745d832a2341336c6d20
Bug 994986 - Remove 'rhc cartridge' because it conflicts with other aliases

Ruby 1.8.7 has random order hashes, and depending on how the commands load the 'rhc cartridge' alias (to list) and 'rhc cartridges' were getting confused.  Since we don't alias the root command in other scenarios, I've removed 'rhc cartridge' as an alias.

Comment 4 Lei Zhang 2013-08-22 02:03:34 UTC
Verified on devenv_3683 and rhc-1.14.0.gem.

[rayzhang@rayzhang Work]$ rhc --version
rhc 1.14.0

[rayzhang@rayzhang Work]$ rhc cartridges --help
Usage: rhc cartridge-list 

Cartridges add functionality to OpenShift applications.  Each application has one web cartridge to listen for HTTP requests, and any number of addon cartridges.  Addons may include databases like MySQL and Mongo, administrative tools
like phpMyAdmin, or build clients like Jenkins.

Most cartridges that listen for incoming network traffic are placed on one or more gears (a small server instance).  Other cartridges may be available across all of the gears of an application to listen for changes (like Jenkins) or
provide environment variables.

Use the 'cartridges' command to see a list of all available cartridges. Add a new cartridge to your application with 'add-cartridge'. OpenShift also supports downloading cartridges - pass a URL in place of the cartridge name and we'll
download and install that cartridge into your app.  Keep in mind that these cartridges receive no security updates.  Note that not all OpenShift servers allow downloaded cartridges.

For scalable applications, use the 'cartridge-scale' command on the web cartridge to set the minimum and maximum scale.

Commands that affect a cartridge within an application will affect all gears the cartridge is installed to.


Options
  -v, --verbose             Display more details about each cartridge

Global Options
  -l, --rhlogin LOGIN       OpenShift login
  -p, --password PASSWORD   OpenShift password
  --token TOKEN             An authorization token for accessing your account.
  --server NAME             An OpenShift server hostname (default: openshift.redhat.com)
  --timeout SECONDS         The timeout for operations

  See 'rhc help options' for a full list of global options.

[rayzhang@rayzhang Work]$ rhc cartridges --help
Usage: rhc cartridge-list 

Cartridges add functionality to OpenShift applications.  Each application has one web cartridge to listen for HTTP requests, and any number of addon cartridges.  Addons may include databases like MySQL and Mongo, administrative tools
like phpMyAdmin, or build clients like Jenkins.

Most cartridges that listen for incoming network traffic are placed on one or more gears (a small server instance).  Other cartridges may be available across all of the gears of an application to listen for changes (like Jenkins) or
provide environment variables.

Use the 'cartridges' command to see a list of all available cartridges. Add a new cartridge to your application with 'add-cartridge'. OpenShift also supports downloading cartridges - pass a URL in place of the cartridge name and we'll
download and install that cartridge into your app.  Keep in mind that these cartridges receive no security updates.  Note that not all OpenShift servers allow downloaded cartridges.

For scalable applications, use the 'cartridge-scale' command on the web cartridge to set the minimum and maximum scale.

Commands that affect a cartridge within an application will affect all gears the cartridge is installed to.


Options
  -v, --verbose             Display more details about each cartridge

Global Options
  -l, --rhlogin LOGIN       OpenShift login
  -p, --password PASSWORD   OpenShift password
  --token TOKEN             An authorization token for accessing your account.
  --server NAME             An OpenShift server hostname (default: openshift.redhat.com)
  --timeout SECONDS         The timeout for operations

  See 'rhc help options' for a full list of global options.


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