Bug 988744 - [fork][origin_runtime_183]oo-cgroup-tempate is using '-t" option for both "--template" and "--templates"
[fork][origin_runtime_183]oo-cgroup-tempate is using '-t" option for both "-...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
1.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Rob Millner
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-26 05:42 EDT by Xiaoli Tian
Modified: 2013-11-17 19:48 EST (History)
3 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Xiaoli Tian 2013-07-26 05:42:47 EDT
Description of problem:
oo-cgroup-template is using -t for both --template and --templates, see result below:

# oo-cgroup-template --help 
== List of arguments
  -c|--with-container-uuid  gear_uuid   Unique identifier for the gears
  -a|--with-all-containers              Run on all gears
  -t|--template template                Template to set
  -t|--templates                        List templates
  -d|--debug                            Enable debug mode
  -h|--help                             Print this message


But when run # oo-cgroup-template -t can not get the templates list like [root@ip-10-164-65-110 ~]# oo-cgroup-template --templates
default
boosted
throttled
frozen
thawed


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

How reproducible:
Always

Steps to Reproduce:
1. oo-cgroup-template --help 
2. oo-cgroup-template -t to see if you could get templates list 


Actual results:
It's using -t for 2 different options:
  -t|--template template                Template to set
  -t|--templates                        List templates

Expected results:
Should choose another short name for --templates


Additional info:
Comment 1 Meng Bo 2013-07-29 06:08:26 EDT
The issue fixed on devenv_3574,

[root@ip-10-152-150-219 openshift]# oo-cgroup-template 
== Synopsis

/usr/bin/oo-cgroup-template: Enable cgroups for a gear
  This command must be run as root.

== Usage

To set a cgroup template for a gear with UUID:
/usr/bin/oo-cgroup-template --with-container-uuid UUID --template TEMPLATE

To set a cgroup template for all gears:
/usr/bin/oo-cgroup-template --with-all-containers --template TEMPLATE

To list the available cgroup templates:
/usr/bin/oo-cgroup-template --templates

To list the template for a gear with UUID:
/usr/bin/oo-cgroup-template --with-container-uuid UUID

== List of arguments
  -c|--with-container-uuid  gear_uuid   Unique identifier for the gears
  -a|--with-all-containers              Run on all gears
  -t|--template template                Template to set
  -s|--templates                        List templates
  -d|--debug                            Enable debug mode
  -h|--help                             Print this message

You have mail in /var/spool/mail/root
[root@ip-10-152-150-219 openshift]# oo-cgroup-template -s
default
boosted
throttled
frozen
thawed
[root@ip-10-152-150-219 openshift]# oo-cgroup-template -t default -a
[root@ip-10-152-150-219 openshift]# 


Please move the bug to ON_QA and we will close it.
Comment 2 Meng Bo 2013-07-30 07:16:13 EDT
Verified on devenv_3582.

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