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:
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.
Fixed in https://github.com/openshift/rhc/pull/441
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.
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.