Bug 1022557

Summary: [LOG_COLLECTOR] - infinite loop in configuration parser
Product: Red Hat Enterprise Virtualization Manager Reporter: Barak Dagan <bdagan>
Component: ovirt-engine-log-collectorAssignee: Sandro Bonazzola <sbonazzo>
Status: CLOSED ERRATA QA Contact: sefi litmanovich <slitmano>
Severity: high Docs Contact:
Priority: urgent    
Version: 3.3.0CC: acathrow, alonbl, bdagan, iheim, knesenko, kroberts, oschreib, pstehlik, Rhev-m-bugs, sbonazzo, yeylon
Target Milestone: ---Keywords: Regression, Triaged
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: rhevm-log-collector-3.3.1-3.el6ev Doc Type: Bug Fix
Doc Text:
When a variable was defined in a recursive way in more than one configuration file, the parser tried to resolve the value of the variable in an infinite loop. The method used for parsing configuration files has been changed to rhevm-lib, so now configuration files are correctly parsed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 17:00:53 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:

Description Barak Dagan 2013-10-23 14:04:25 UTC
Description of problem:
When rhevm-reports is installed, placing /etc/ovirt-engine/engine.conf.d/50-redhat-support-plugin.conf (ENGINE_APPS="${ENGINE_APPS} redhat-support-plugin-rhev.ear").

parser dereference ENGINE_APPS in a recursion: ${ENGINE_APPS} rhevm-reports.war rhevm-reports.war rhevm-reports.war .....

So log collector enters infinite loop, consuming 100% CPU.


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

How reproducible:
100%

Steps to Reproduce:
1. install rhevm + dwh + reports
2. run log collector utility
3.

Actual results:
Tool enters infinite loop

Expected results:
logs collection

Additional info:

Comment 2 Sandro Bonazzola 2013-10-24 15:04:53 UTC
patch merged upstream master, pushed to 3.3 branch.

Comment 3 Sandro Bonazzola 2013-10-25 07:43:56 UTC
patch merged upstream 3.3 branch.

Comment 5 sefi litmanovich 2013-11-06 08:44:53 UTC
Verified on RHEVM 3.3 IS21.

Comment 6 Barak Dagan 2013-11-07 12:54:49 UTC
Verification failed on IS21:

# rpm -q rhevm-log-collector
rhevm-log-collector-3.3.1-2.el6ev.noarch

# rpm -qa | egrep 'report|dwh'
rhevm-dwh-3.3.0-18.el6ev.noarch
rhevm-reports-3.3.0-18.el6ev.noarch
jasperreports-server-pro-5.5.0-4.el6ev.noarch


# date
Thu Nov  7 14:53:46 IST 2013
[root@fire33-vdc ~]# rhevm-log-collector 
# date
Thu Nov  7 14:54:08 IST 2013

Comment 7 Sandro Bonazzola 2013-11-07 13:33:09 UTC
It's fixed in IS22.

Comment 8 sefi litmanovich 2013-11-11 11:47:47 UTC
Verified on RHEVM 3.3 IS22:

#rpm -q rhevm-log-collector
rhevm-log-collector-3.3.1-3.el6ev.noarch

# rpm -qa | egrep 'report|dwh'
rhevm-dwh-3.3.0-19.el6ev.noarch
rhevm-reports-3.3.0-19.el6ev.noarch
jasperreports-server-pro-5.5.0-4.el6ev.noarch

#rpm -qa | grep redhat-support*
redhat-support-plugin-rhev-3.3.0-11.el6ev.noarch

# engine-log-collector collect
INFO: Gathering oVirt Engine information...
INFO: Gathering PostgreSQL the oVirt Engine database and log files from localhost...
Please provide the REST API password for the admin@internal oVirt Engine user (CTRL+D to skip): 
INFO: No hypervisors were selected, therefore no hypervisor data will be collected.
Creating compressed archive...
INFO: Log files have been collected and placed in /tmp/sosreport-LogCollector-20131111134045.tar.xz.
The MD5 for this file is 7ccbdf1175dc00ba79cf46ddfee336d8 and its size is 5.8M

Comment 9 Charlie 2013-11-28 01:16:13 UTC
This bug is currently attached to errata RHBA-2013:15255. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to 
minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.

Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:

* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')

Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.

For further details on the Cause, Consequence, Fix, Result format please refer to:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes 

Thanks in advance.

Comment 10 errata-xmlrpc 2014-01-21 17:00:53 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.

http://rhn.redhat.com/errata/RHBA-2014-0039.html