Bug 966535 - oo-admin-cartridge usage pattern and actual usage mismatch: --cartridge_version/--cartridge-version
oo-admin-cartridge usage pattern and actual usage mismatch: --cartridge_versi...
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Jhon Honce
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-05-23 08:48 EDT by Miciah Dashiel Butler Masters
Modified: 2015-05-14 19:19 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-08-07 18:54:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Miciah Dashiel Butler Masters 2013-05-23 08:48:59 EDT
Description of problem:

The usage pattern that oo-admin-cartridge prints when I enter `oo-admin-cartridge -h` is inaccurate: it lists --cartridge-version (with a hyphen), but oo-admin-cartridge only recognises --cartridge_version (with an underscore).

Version-Release number of selected component (if applicable):

How reproducible:


Steps to Reproduce:

[root@node01 ~]# oo-admin-cartridge --help
Usage: --action ACTION [--recursive] [--mco] [--source directory] [--name NAME -
-version VERSION --cartridge-version VERSION]

[root@node01 ~]# oo-admin-cartridge --action erase --name php --version 5.3 --ca
rtridge-version 0.0.1
/usr/sbin/oo-admin-cartridge:108:in `<main>': invalid option: --cartridge-versio
n (OptionParser::InvalidOption)

[root@node01 ~]# oo-admin-cartridge --action erase --name php --version 5.3 --ca
rtridge_version 0.0.1

Actual results:

I got an error on step 2 where I followed the usage pattern that `oo-admin-cartridge -h` gave me.

Expected results:

Step 2 should have worked.

Additional info:

Looks like this defect has existed since the introduction of oo-admin-cartridge: https://github.com/calfonso/origin-server/commit/d868eef8f2f8ef649d014361e40937760063b5af
Comment 1 Paul Morie 2013-08-01 13:43:36 EDT
PR submitted to master.
Comment 3 Yan Du 2013-08-02 06:12:20 EDT
verified on devenv_3605, issue can't be reproduced.

[root@ip-10-167-13-167 cartridges]# oo-admin-cartridge --help
Usage: --action ACTION [--recursive] [--mco] [--source directory] [--name NAME --version VERSION --cartridge_version VERSION]

    -a, --action ACTION              one of <install|list|erase>
    -s, --source path                Directory of the cartridge to install
        --mco                        Issue action via mcollective agent
    -R, --recursive                  Source is assumed to point to a directory containing cartridge directories
    -l, --list                       List cartridges in repository
    -n, --name NAME                  Name of cartridge to erase
    -v, --version VERSION            Version of packaged software to erase
    -c, --cartridge_version VERSION  Version of cartridge to erase
        --offline                    ignored
    -d, --debug                      enable additional output

[root@ip-10-167-13-167 cartridges]# oo-admin-cartridge --action erase --name zend --version 5.6 --cartridge_version 0.0.4

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