Bug 1284432

Summary: [RFE] Provide a way to easily configure the log level for ovirt optimiser and optaplanner
Product: Red Hat Enterprise Virtualization Manager Reporter: Roman Hodain <rhodain>
Component: ovirt-optimizerAssignee: Martin Sivák <msivak>
Status: CLOSED CURRENTRELEASE QA Contact: Shira Maximov <mshira>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.6.0CC: amarchuk, dfediuck, gdesmet, gklein, juwu, lsurette, mavital, mgoldboi, msivak, rbalakri, rgolan, rhodain, sbonazzo, srevivo, ykaul
Target Milestone: ovirt-4.0.4Keywords: FutureFeature
Target Release: 4.0.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-optimizer-0.10 Doc Type: Enhancement
Doc Text:
This update adds logging configuration files to /etc/ovirt-optimizer so the files are easy to locate.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-17 13:09:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1347215    
Bug Blocks:    

Description Roman Hodain 2015-11-23 10:26:34 UTC
Description of problem:
It s currently not easy to adjust the log level for ovir optimiser and optaplanner. There needs to be way to do this easily. For example a configuration file in /etc/ovirt-optimizer/

Version-Release number of selected component (if applicable):
ovirt-optimizer-jboss7-0.8-1.noarch

Comment 1 Geoffrey De Smet 2015-11-24 07:55:57 UTC
@Martin Sivak For OptaPlanner, adjusting the logging level is decribed here:
  http://docs.jboss.org/optaplanner/release/latest/optaplanner-docs/html_single/index.html#logging
So I presume this will be a matter of bridging that to /etc/ovirt-optimizer somehow. If you're using logback as the logging implementation, the log level can be adjusted at runtime during bootstrap (see Logback/Slf4J documentation).

Comment 2 Doron Fediuck 2015-11-24 09:36:22 UTC
Since the ability to properly debug is important enough,
targeting for 3.6.4.

Comment 3 Martin Sivák 2015-11-24 13:16:09 UTC
Uh Roman, what version did you test? You were running the 3.5 deployment when we were discussing this.

3.6 is very different in this area. It uses a proper ovirt-optimizer-jboss service and there is a config file in /usr/share/java/ovirt-optimizer/jboss7.war/WEB-INF/classes/log4j.properties

It might be a good idea to add a symlink to /etc/ though.

Comment 5 Roman Hodain 2016-01-08 13:55:31 UTC
At that time the deployment was 3.5. The issue was noticed on a production system.

Comment 6 Red Hat Bugzilla Rules Engine 2016-01-27 11:34:08 UTC
This bug is flagged for 3.6, yet the milestone is for 4.0 version, therefore the milestone has been reset.
Please set the correct milestone or add the flag.

Comment 8 Martin Sivák 2016-02-10 12:28:29 UTC
Already merged, but I do not have the build version yet as there are more changes to come.

Comment 9 Mike McCune 2016-03-28 23:10:48 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 10 Roy Golan 2016-04-21 07:14:48 UTC
Can be move to MOD now?

Comment 11 Martin Sivák 2016-04-21 08:09:40 UTC
Doron asked me to wait with downstream Optimizer update until we finish the RPMs of Optaplanner. So I do not have the downstream build yet.

Comment 15 Shira Maximov 2016-09-15 10:39:24 UTC
verified on : 
ovirt-optimizer-0.11-1.el7ev.noarch

verification steps: 
1. installing the optimizer 
2. edit the last two lines in the file : /etc/ovirt-optimizer/jboss-log4j.properties

to the wanted behaviour: DEBUG/WARNING/INFO/ERROR

for example :
log4j.logger.org.optaplanner=DEBUG, appout
log4j.logger.org.ovirt.optimizer=DEBUG, appout
 
3. restart the ovirt-optimizer-jboss service 
4. check that the logs are in the correct behaviour
 ( in : /var/log/ovirt-optimizer/jboss/ovirt-optimizer.log)