Bug 988744 - [fork][origin_runtime_183]oo-cgroup-tempate is using '-t" option for both "--template" and "--templates"
Summary: [fork][origin_runtime_183]oo-cgroup-tempate is using '-t" option for both "-...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 1.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Rob Millner
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-26 09:42 UTC by Xiaoli Tian
Modified: 2013-11-18 00:48 UTC (History)
3 users (show)

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


Attachments (Terms of Use)

Description Xiaoli Tian 2013-07-26 09:42:47 UTC
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 10:08:26 UTC
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 11:16:13 UTC
Verified on devenv_3582.


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