Bug 966535 - oo-admin-cartridge usage pattern and actual usage mismatch: --cartridge_version/--cartridge-version
Summary: oo-admin-cartridge usage pattern and actual usage mismatch: --cartridge_versi...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-23 12:48 UTC by Miciah Dashiel Butler Masters
Modified: 2015-05-14 23:19 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-07 22:54:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Miciah Dashiel Butler Masters 2013-05-23 12:48:59 UTC
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:

Entirely.

Steps to Reproduce:

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

2.
[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)

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

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 17:43:36 UTC
PR submitted to master.

Comment 3 Yan Du 2013-08-02 10:12:20 UTC
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]

Options:
    -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
succeeded


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