Bug 1506178 - Multiple minor issues with help of configure_metrics script
Summary: Multiple minor issues with help of configure_metrics script
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine-metrics
Classification: oVirt
Component: Generic
Version: 1.0.7.1
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ovirt-4.2.1
: ---
Assignee: Shirly Radco
QA Contact: Lukas Svaty
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-25 10:35 UTC by Lukas Svaty
Modified: 2018-02-12 11:46 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine-metrics-1.1.2.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-12 11:46:52 UTC
oVirt Team: Metrics
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 86177 0 master MERGED Fix short help (-h) parameter 2018-01-14 20:52:01 UTC
oVirt gerrit 86608 0 master MERGED Fix configure metrics script help message 2018-01-23 07:58:00 UTC

Description Lukas Svaty 2017-10-25 10:35:05 UTC
Description of problem:
Parameters -h and --help should have the same functionality

Version-Release number of selected component (if applicable):
ovirt-engine-metrics-1.0.7.1-1.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. [root@1 /]# /usr/share/ovirt-engine-metrics/setup/ansible/configure_ovirt_machines_for_metrics.sh --help
Usage: /usr/share/ovirt-engine-metrics/setup/ansible/configure_ovirt_machines_for_metrics.sh

  --scope=SCOPE
        SCOPE is one of 'hosts', 'engine', 'all'
  --tags=TAGS
        TAGS is one of 'configure' (default), 'manage_services'

2. [root@1 /]# /usr/share/ovirt-engine-metrics/setup/ansible/configure_ovirt_machines_for_metrics.sh -h
Usage: ansible-playbook playbook.yml

Options:
  --ask-vault-pass      ask for vault password
... omitted output...

Expected results:
-h should not delegate help param to ansible-playbook, rather use help message of configure script

Comment 1 Yaniv Kaul 2017-10-29 08:12:14 UTC
I'm not sure if it's a bug or a RFE, but in any case, would be simpler if you've just sent a patch to fix this ;-)

Comment 2 Lukas Svaty 2017-10-31 07:57:24 UTC
True, however rather than quick-fixing just -h parameter, better would be to create a proper design for this bz and review ansible-playbook parameters and forward to ansible-playbook util only those we want to support such as --extra-vars/--scope/--tags, otherwise help is not really useful, we can just add there to check ansible-playbook help and mention tags we added.

Comment 4 Lukas Svaty 2018-01-19 16:47:05 UTC
Instead of creating new RFE I'll hijack this one and post everything about command line utility arguments that need to be fixed as this one only contains insignificant change, and comment#2 was ignored.

Actual help with my comments after ***:
Usage: /usr/share/ovirt-engine-metrics/setup/ansible/configure_ovirt_machines_for_metrics.sh

  --playbook=PLAYBOOK
        PLAYBOOK, the name of the playbook to run, is one of:
        configure-ovirt-metrics.yml, manage-ovirt-metrics-services.yml.
        Default, configure-ovirt-metrics.yml.
*** ^^ s/Default, configure-/Default is configure-/
  --scope=SCOPE
        SCOPE is one of 'hosts', 'engine', 'all'.
*** What is the default?
  --log=FILE
        Write the log also to FILE. Defaults to a file inside /var/log/ovirt-engine/ansible.

  Available params for manage-ovirt-metrics-services.yml playbook:
  -e service_state=SERVICE_STATE
        SERVICE_STATE is one of 'started', 'restarted', 'stopped', 'reloaded'.
  -e service_name=SERVICE_NAME
        SERVICE_NAME is a list of the services that will be managed by the role.
        Default, ["collectd", "fluentd"].
*** ^^^ s/Default, /Default is/
  -e service_enabled=SERVICE_ENABLED
        SERVICE_ENABLED is used to configure if the processes will be enabled.
        Default is 'yes'.
*** ^^ s/Default, is 'yes'/Default is 'yes'/

Issues that need addressing:
1. All the parameters not caught by our configure script are passed to ansible-playbook utility.
  - either mention it in help or specify and pass only specific ones (I would suggest adding to help that others parameters are passed to ansible-playbook as its easy fix)

2. "Default, VALUE" does not make sense, either put ':' or 'is' after default

3. --scope does not have default documented, it brings user to think its mandatory

4. -e service_enabled - why is this parameter included in -e service_state and one of the option enabled/disabled? Ansible has parameter enabled: True|False for services please use it

tested in ovirt-engine-metrics-1.1.2.1-1.el7ev.noarch

Comment 5 Lukas Svaty 2018-01-19 16:48:46 UTC
also:

5. Write the log also to FILE. Defaults to a file inside /var/log/ovirt-engine

Should be split to two lines with Defaults starting a new line to be consistent with others

Comment 6 Lukas Svaty 2018-01-26 15:08:59 UTC
verified in ovirt-engine-metrics-1.1.2.2-1.el7ev.noarch

NOT IMPLEMENTED:
4. -e service_enabled - why is this parameter included in -e service_state and one of the option enabled/disabled? Ansible has parameter enabled: True|False for services please use it

If you believe this needs additional issue feel free to open one or reopen this one.

Comment 7 Sandro Bonazzola 2018-02-12 11:46:52 UTC
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.1 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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