Bug 1772506

Summary: Fluentd error when stopping metrics services through playbook on 4.3
Product: Red Hat Enterprise Virtualization Manager Reporter: Guilherme Santos <gdeolive>
Component: ovirt-engine-metricsAssignee: Shirly Radco <sradco>
Status: CLOSED ERRATA QA Contact: Guilherme Santos <gdeolive>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.3.7CC: emarcus, pelauter
Target Milestone: ovirt-4.3.8Keywords: ZStream
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-13 15:24:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Metrics RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1727546    
Bug Blocks:    

Description Guilherme Santos 2019-11-14 14:15:35 UTC
Description of problem:
Following this uninstall tutorial: https://pnt-devops-rad-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/ccs-mr-preview-prod/9358/artifact/doc-Metrics_Store_Installation_Guide/preview/index.html#removing_metrics_store we get an error running the playbook. 
It complains that it didn't find fluentd service to be stopped.
The problem is on oVirt.metrics/roles/oVirt.manage-services/defaults/main.yml...

# cat oVirt.metrics/roles/oVirt.manage-services/defaults/main.yml
---
service_enabled: yes

service_state: restarted

service_name:
  - 'collectd'
  - 'fluentd'
  - 'rsyslog'


fluentd is specified here even though we are dealing with 4.3.
I think we could complement this role,calling `rpm -q ovirt-engine` on the task
and using the response to get a different list of services depending if it's 4.3 or 4.2

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

How reproducible:
always

Steps to Reproduce:
1.Follow the appendix B tutorial on the link 
2.
3.

Actual results:
fluentd not found error on oVirt.metrics/roles/oVirt.manage-services task

Expected results:
No errors (only try to stop fluentd if it's 4.2)

Additional info:

Comment 2 Guilherme Santos 2020-01-15 02:02:07 UTC
Verified on:
ovirt-engine-metrics-1.3.6.1-1.el7ev.noarch

Steps:
1. SSH on an engine with metrics configured and running 
2. # cd /usr/share/ovirt--engine-metrics
3. # ./configure_ovirt_machines_for_metrics.sh --playbook=manage-ovirt-metrics-services.yml -e service_state=stopped

Results
Playbook run successfully with no errors or tasks failed
rsyslog/collectd stopped on all hosts of the target engine and the engine itself

Comment 4 errata-xmlrpc 2020-02-13 15:24:47 UTC
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://access.redhat.com/errata/RHSA-2020:0498