Bug 1010939 - [origin_ui_88] The help info of domain configure is so confusing so that user can use --no-allowed-gear-sizes option with arguments, and actually it is not supported
[origin_ui_88] The help info of domain configure is so confusing so that user...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Jordan Liggitt
libra bugs
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-23 06:36 EDT by Wei Sun
Modified: 2015-05-14 22:25 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-23 22:23:22 EST
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 Wei Sun 2013-09-23 06:36:34 EDT
Description of problem:
Check rhc domain-configure -h,could get "--[no-]allowed-gear-sizes [SIZES] A comma-delimited list of the gear sizes that will be allowed in this domain."

But try to unset one gear size (such as small )when an account have two gear sizes(small and medium),will get "Too many arguments passed in: small no-allowed-gear-sizes --",and could not unset gear size successfully.Only allow to unset all gear sizes,but for website,could unset one gear size .

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

How reproducible:
Always

Steps to Reproduce:
1.Create a domain with a silver account
2.Make sure have medium and small gear size in the domain
3.Try to  unset small gear size for the domain via CLI
4.Try to unset all gear size for the domain via CLI

Actual results:
2.[wsun@dhcp-8-229 dev]$ rhc domain-configure wsunfork8441 --allowed-gear-sizes small,medium
Updating domain configuration ... done

Domain wsunfork8441 configuration
---------------------------------
  Allowed Gear Sizes: small, medium

3.[wsun@dhcp-8-229 dev]$ rhc domain-configure wsunfork8441 --no-allowed-gear-sizes small
Too many arguments passed in: small
Usage: rhc domain-configure <namespace>
Pass '--help' to see the full list of options

4.[wsun@dhcp-8-229 dev]$ rhc domain-configure wsunfork8441 --no-allowed-gear-sizes 
Updating domain configuration ... done

Domain wsunfork8441 configuration
---------------------------------
  Allowed Gear Sizes: <none>


Expected results:
Should allow to unset one gear size for the domain via CLI

Additional info:
Comment 1 Wei Sun 2013-09-23 07:44:54 EDT
rhc version is rhc 1.15.0 build from fork_ami_origin_ui_72_membership_844
Comment 2 Clayton Coleman 2013-09-23 13:48:38 EDT
This is difficult for us to fix because the upstream command library we use is what is providing this behavior to us.

The supported calls are:

--no-allowed-gear-sizes
  sets the allowed gear sizes to []
--allowed-gear-sizes=
  sets the allowed gear sizes to []
--allowed-gear-sizes=small,medium
  sets the allowed gear sizes to [small,medium]

All other options are unsupported.
Comment 3 weiwei jiang 2013-11-12 04:47:24 EST
Tried with rhc-1.17.3, and the help info is so confusing.

According to the help info of domain configure,[SIZES] arguments of  --no-allowed-gear-sizes option is optional, means you can pass a argument to --no-allowed-gear-sizes, and actually it is not supported.

$ rhc domain configure -h
Usage: rhc domain-configure <namespace>

Change one or more configuration settings on the domain


Options
  --[no-]allowed-gear-sizes [SIZES] A comma-delimited list of the gear sizes that will be allowed in this domain.
  -n, --namespace NAME              Name of a domain

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.

And I hope the help info will be more clear, thx
Comment 4 Jordan Liggitt 2013-11-12 10:25:35 EST
Separated --allowed-gear-sizes and --no-allowed-gear-sizes options
Will merge in https://github.com/openshift/rhc/pull/509
Comment 5 openshift-github-bot 2013-11-12 14:56:44 EST
Commit pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/4562271c9aa1e2e8865c97057b5d992dd40e3c5b
Bug 1010939: Improve no allowed gear sizes
Comment 6 weiwei jiang 2013-11-12 21:38:50 EST
Tried on devenv_4027, and result as follow:

[root@ip-10-185-177-123 ~]# rhc configure-domain --help
Usage: rhc domain-configure <namespace>

Change one or more configuration settings on the domain


Options
  --no-allowed-gear-sizes      Do not allow any gear sizes in this domain.
  --allowed-gear-sizes [SIZES] A comma-delimited list of gear sizes allowed in this domain. To see available sizes, run 'rhc account'.
  -n, --namespace NAME         Name of a domain

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.

So, verified this issue. Thx.

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