Bug 1040026

Summary: [DWH-SETUP] - Missing "ovirt engine history db" creation log
Product: Red Hat Enterprise Virtualization Manager Reporter: Barak Dagan <bdagan>
Component: ovirt-engine-dwhAssignee: Ofer Schreiber <oschreib>
Status: CLOSED ERRATA QA Contact: Barak Dagan <bdagan>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.3.0CC: acathrow, bazulay, iheim, oschreib, pstehlik, Rhev-m-bugs, yeylon, ylavi
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: is28 - rhevm-dwh-3.3.0-26.el6ev.noarch.rpm Doc Type: Bug Fix
Doc Text:
Previously, the installer passed a relative path to the database schema creation script, which created the log file under the current directory. Now, the installer passes the full log path, so the logs are created in the expected directory.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 15:03:58 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:
Bug Depends On:    
Bug Blocks: 1049022    
Attachments:
Description Flags
rhevm dwh setup log
none
Example of create_schema.sh generated log none

Description Barak Dagan 2013-12-10 14:34:11 UTC
Created attachment 834795 [details]
rhevm dwh setup log

Description of problem:

in dhw installation log, mentioned that history db creation is logged, but the log file is missing.

# grep creation rhevm-dwh-setup-2013_12_03_19_17_58.log
2013-12-03 19:18:08::DEBUG::rhevm-dwh-setup::151::root:: ovirt engine history db creation is logged at /var/log/ovirt-engine/ovirt-history-db-install-2013_12_03_19_18_08.log

# less /var/log/ovirt-engine/ovirt-history-db-install-2013_12_03_19_18_08.log
/var/log/ovirt-engine/ovirt-history-db-install-2013_12_03_19_18_08.log: No such file or directory

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

How reproducible:
100%

Steps to Reproduce:
1. Install engine + dwh
2. look for history db creation log in the setup log and in file system
3.

Actual results:


Expected results:


Additional info:

Comment 1 Itamar Heim 2013-12-11 07:24:35 UTC
is impact is not having the installation log - this is a blocker

Comment 2 Ofer Schreiber 2013-12-12 11:52:19 UTC
Actual problem is in the create_schema.sh file, which doesn't honor the '-l LOGFILE' parameter at all.

Installation log is created without a problem, just the schema creation is not logged correctly.
I'm not sure it's a 3.3 blocker.

Comment 3 Eli Mesika 2013-12-12 12:32:42 UTC
Created attachment 835782 [details]
Example of create_schema.sh generated log

Comment 4 Eli Mesika 2013-12-12 12:34:04 UTC

(In reply to Ofer Schreiber from comment #2)
> Actual problem is in the create_schema.sh file, which doesn't honor the '-l
> LOGFILE' parameter at all.
> 
> Installation log is created without a problem, just the schema creation is
> not logged correctly.
> I'm not sure it's a 3.3 blocker.

Had tried the following on a new created DB
create_schema.sh -u engine -d engine_1040026 -l ~/tmp/engine_1040026.log

This created the required log (attached in comment #3) 

Please reexamine the cause of this BZ , create_schema.sh works as expected with the -l flag

Comment 5 Ofer Schreiber 2013-12-12 13:55:16 UTC
Found the issue - seems that the installer doesn't pass a full path to the requested log file, but a relative one.

Comment 10 Barak Dagan 2013-12-22 14:36:56 UTC
Verified on is28.1:

local 
======
# grep ovirt-history-db rhevm-dwh-setup-2013_12_22_12_01_21.log
2013-12-22 12:01:29::DEBUG::rhevm-dwh-setup::151::root:: ovirt engine history db creation is logged at /var/log/ovirt-engine/ovirt-history-db-install-2013_12_22_12_01_29.log
2013-12-22 12:01:29::DEBUG::common_utils::874::root:: Executing command --> '/usr/share/ovirt-engine-dwh/db-scripts/create_schema.sh -l /var/log/ovirt-engine/ovirt-history-db-install-2013_12_22_12_01_29.log -u engine_history -s localhost -p 5432 -g' in working directory '/etc/yum.repos.d'

# ll /var/log/ovirt-engine/ovirt-history-db-install-2013_12_22_12_01_29.log
-rw-r--r--. 1 root root 640098 Dec 22 12:01 /var/log/ovirt-engine/ovirt-history-db-install-2013_12_22_12_01_29.log

Remote 
=======

Comment 12 errata-xmlrpc 2014-01-21 15:03:58 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-0036.html