Description of problem: When missing some required parameter or error parameter in use "rhc server add" command, it prompt incorrect information Version-Release number of selected component (if applicable): ose2.2/2014-19.1 rhc 1.31.2.1 How reproducible: Always Steps to Reproduce: 1.rhc server add 2.rhc server add broker.ose222.example.com --ssl-ca-file ./ca.crt --ssl-client-cert-file ./yanywang2.crt Actual results: 1.# rhc server add Missing required argument 'hostname'. Usage: rhc server-add <hostname> [<nickname>] [--rhlogin LOGIN] [--[no-]use-authorization-tokens] [--[no-]insecure] [--use] [--skip-wizard] [--timeout SECONDS] [--ssl-ca-file FILE] [--ssl-client-cert-file FILE] [--ssl-version VERSION] Pass '--help' to see the full list of options 2.# rhc server add broker.ose222.example.com --ssl-ca-file ./ca.crt --ssl-client-cert-file ./yanywang2.crt You are not authorized to perform this operation. Expected results: 1.Should prompt correct and important parameter like help options. --ssl-client-key-file parameter missing 2.Should tell user missing --ssl-client-key-file parameter Additional info:
Commits pushed to master at https://github.com/openshift/rhc https://github.com/openshift/rhc/commit/04fd726c2974706aa1812f2ebb0530222f8868b4 server.rb: fixes incorrect error output and additional input validation Bug 1155003 Bugzilla link https://bugzilla.redhat.com/show_bug.cgi?id=1155003 Changes usage messages to include --ssl-client-key-file option, which was previously missing. The rhc server add command also requires all three of --ssl-ca-file, --ssl-client-cert-file, and ssl-client-key-file and will now raise an error if only 1 or 2 of the 3 are present. Adds corresponding spec test. https://github.com/openshift/rhc/commit/69a2fcebc3ce274851aed229be8c65c45bdc45eb Merge pull request #707 from thrasher-redhat/bug1155003 Merged by openshift-bot
Verified on latest puddle: OpenShiftEnterpriseErrata/2.2/2015-11-11.1 # rpm -qa|grep rhc rhc-1.38.4.1-1.el6op.noarch Steps to verify: 1.Check the help info for server add, there is option --ssl-client-key-file now. # rhc server add -h --ssl-client-key-file FILE An RSA client certificate key 2.When providing 1 or 2 options of the 3 options:--ssl-ca-file, --ssl-client-cert-file, and --ssl-client-key-file , there will be error info shown up. 2.1 # rhc server add broker.ose22-auto.com.cn --ssl-ca-file /tmp/ca.crt You must use the --ssl-ca-file, --ssl-client-cert-file, and --ssl-client-key-file commands together. Usage: rhc server-add <hostname> [<nickname>] [--rhlogin LOGIN] [--[no-]use-authorization-tokens] [--[no-]insecure] [--use] [--skip-wizard] [--timeout SECONDS] [--ssl-ca-file FILE] [--ssl-client-cert-file FILE] [--ssl-client-key-file FILE] [--ssl-version VERSION] Pass '--help' to see the full list of options 2.2 # rhc server add broker.ose22-auto.com.cn --ssl-ca-file /tmp/ca.crt --ssl-client-cert-file /tmp/ca2.crt You must use the --ssl-ca-file, --ssl-client-cert-file, and --ssl-client-key-file commands together. Usage: rhc server-add <hostname> [<nickname>] [--rhlogin LOGIN] [--[no-]use-authorization-tokens] [--[no-]insecure] [--use] [--skip-wizard] [--timeout SECONDS] [--ssl-ca-file FILE] [--ssl-client-cert-file FILE] [--ssl-client-key-file FILE] [--ssl-version VERSION] Pass '--help' to see the full list of options 2.3 # rhc server add broker.ose22-auto.com.cn --ssl-ca-file /tmp/ca.crt --ssl-client-key-file .ssh/id_rsa You must use the --ssl-ca-file, --ssl-client-cert-file, and --ssl-client-key-file commands together. Usage: rhc server-add <hostname> [<nickname>] [--rhlogin LOGIN] [--[no-]use-authorization-tokens] [--[no-]insecure] [--use] [--skip-wizard] [--timeout SECONDS] [--ssl-ca-file FILE] [--ssl-client-cert-file FILE] [--ssl-client-key-file FILE] [--ssl-version VERSION] Pass '--help' to see the full list of options The bug is fixed, so move it to Verified.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-2666.html