Bug 1271037

Summary: Should give out useful help doc for atomic-openshift-installer
Product: OpenShift Container Platform Reporter: Ma xiaoqiang <xiama>
Component: InstallerAssignee: Samuel Munilla <smunilla>
Status: CLOSED CURRENTRELEASE QA Contact: Ma xiaoqiang <xiama>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: adellape, aos-bugs, bleanhar, dgoodwin, jokerman, mmccomas, smunilla, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openshift-ansible-3.0.12-1.git.25.269bbc5.el7aos Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-20 15:42:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ma xiaoqiang 2015-10-13 02:13:47 UTC
Description of problem:
Should give out useful help doc for oo-install


Version-Release number of selected component (if applicable):
oo-install-3.0.3-1.el7aos.noarch

How reproducible:
100%


Steps to Reproduce:
1. run 'oo-install --help'
#oo-install --help

Actual results:
Usage: oo-install [OPTIONS]

Options:
  -c, --configuration PATH
  -a, --ansible-playbook-directory DIRECTORY
  --ansible-config PATH
  --ansible-log-path PATH
  -t, --deployment-type [origin|online|enterprise|atomic-enterprise|openshift-enterprise]
  -u, --unattended
  -h, --host TEXT
  --help                          Show this message and exit.



Expected results:
Should give out usefull help doc. For example: a link to provide detail instructions of oo-install.

Comment 1 Alex Dellapenta 2015-10-29 20:15:21 UTC
It would also be nice if -h showed --help output:

# atomic-openshift-installer -h
Error: no such option: -h

Also possibly if running it with no options just showed --help output too:

# atomic-openshift-installer 
Usage: atomic-openshift-installer [OPTIONS]

Error: Invalid value: An ansible path must be provided

---
Using atomic-openshift-utils-3.0.3-1.git.8.514ec79.el7aos.noarch for the above.

Comment 2 Devan Goodwin 2015-10-30 13:49:36 UTC
Will take a look at this for 3.1.

Comment 3 Devan Goodwin 2015-11-04 13:16:15 UTC
This is likely fixed in latest builds but if not, as soon as https://github.com/openshift/openshift-ansible/pull/792 is merged.

$ atomic-openshift-installer --help
Usage: atomic-openshift-installer [OPTIONS] COMMAND [ARGS]...

  The main click CLI module. Responsible for handling most common CLI
  options, assigning any defaults and adding to the context for the sub-
  commands.

Options:
  -u, --unattended
  -c, --configuration PATH
  -a, --ansible-playbook-directory DIRECTORY
  --ansible-config PATH
  --ansible-log-path PATH
  --help                          Show this message and exit.

Commands:
  install
  uninstall
  upgrade


Help is also available for each subcommand.


$ atomic-openshift-installer install --help
Usage: atomic-openshift-installer install [OPTIONS]

Options:
  -f, --force
  --help       Show this message and exit.

Comment 4 Alex Dellapenta 2015-11-11 20:16:28 UTC
Is the description paragraph about "The main click CLI module" intended or possibly a hold over from something python-click related?

-------

[root@adellape-111115-quick ~]# atomic-openshift-installer --help
Usage: atomic-openshift-installer [OPTIONS] COMMAND [ARGS]...

  The main click CLI module. Responsible for handling most common CLI
  options, assigning any defaults and adding to the context for the sub-
  commands.

Options:
  -u, --unattended
  -c, --configuration PATH
  -a, --ansible-playbook-directory DIRECTORY
  --ansible-config PATH
  --ansible-log-path PATH
  -v, --verbose
  --help                          Show this message and exit.

Commands:
  install
  uninstall
  upgrade

-------

I can open a separate BZ for this, but I also noticed that you can't do "install -u"; it has to be "-u install" (same with --unattended):

-------

[root@adellape-111115-quick ~]# atomic-openshift-installer install -u
Error: no such option: -u
[root@adellape-111115-quick ~]# atomic-openshift-installer install --help
Usage: atomic-openshift-installer install [OPTIONS]

Options:
  -f, --force
  --help       Show this message and exit.
[root@adellape-111115-quick ~]# atomic-openshift-installer -u install

-------

Haven't checked if the other subcommands and options behave the same way.

Comment 5 Samuel Munilla 2015-11-11 20:33:00 UTC
The subcommand ordering is unfortunately a feature of click, we'll just need to make sure it's well documented. That docstring could probably use some revision though. I'll see what I can come up with.

Comment 7 Ma xiaoqiang 2015-11-16 09:25:59 UTC
Can get useful help doc