Yaniv Dary has uploaded a new change for review.

Change subject: packaging: fixed setup issues (#876240\876242)
......................................................................

packaging: fixed setup issues (#876240\876242)

- made etl run always with the ovirt engine java version.
- fixed the return code value return from service.
- added sleep to let health status load before etl start.

bug-url: https://bugzilla.redhat.com/876242
bug-url: https://bugzilla.redhat.com/876240

Change-Id: I608a4495c65459e0488ef298cf790ce5ab454830
Signed-off-by: Yaniv Dary <yd...@redhat.com>
---
M data-warehouse/history_etl/history_service/history_service.sh
M data-warehouse/history_etl/history_service/ovirt-engine-dwhd
M packaging/ovirt-engine-dwh-setup.py
3 files changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-dwh refs/changes/77/9277/1

diff --git a/data-warehouse/history_etl/history_service/history_service.sh 
b/data-warehouse/history_etl/history_service/history_service.sh
index db099db..c56f58f 100755
--- a/data-warehouse/history_etl/history_service/history_service.sh
+++ b/data-warehouse/history_etl/history_service/history_service.sh
@@ -1,11 +1,13 @@
 #!/bin/bash -x
 #
 
+. /etc/sysconfig/ovirt-engine
+
 LOGFILE="/var/log/ovirt-engine/ovirt-engine-dwhd.log"
 ETL_HOME=/usr/share/ovirt-engine-dwh/etl
 JAVA_DIR=/usr/share/java
 RUN_PROPERTIES="-Xms256M -Xmx1024M"
 
CP=$ETL_HOME:$JAVA_DIR/ovirt-engine-dwh/historyETLProcedure.jar:$JAVA_DIR/ovirt-engine-dwh/advancedPersistentLookupLib.jar:$JAVA_DIR/ovirt-engine-dwh/talendRoutines.jar:$JAVA_DIR/dom4j.jar:$JAVA_DIR/commons-collections.jar:$JAVA_DIR/log4j.jar:$JAVA_DIR/postgresql-jdbc.jar
 
-exec java $RUN_PROPERTIES -cp $CP ovirt_engine_dwh.historyetl_3_1.HistoryETL 
--context=Default $* >> $LOGFILE 2>&1 &
+exec ${JAVA_HOME}/bin/java $RUN_PROPERTIES -cp $CP 
ovirt_engine_dwh.historyetl_3_1.HistoryETL --context=Default $* >> $LOGFILE 
2>&1 &
 echo $! >$ETL_PID
diff --git a/data-warehouse/history_etl/history_service/ovirt-engine-dwhd 
b/data-warehouse/history_etl/history_service/ovirt-engine-dwhd
index 5c096cb..d80877b 100644
--- a/data-warehouse/history_etl/history_service/ovirt-engine-dwhd
+++ b/data-warehouse/history_etl/history_service/ovirt-engine-dwhd
@@ -85,6 +85,7 @@
     pid=0
     procrunning > /dev/null 2>&1
     [ $RETVAL = 0 ] && [ $pid != '0' ] && touch $lock_file && success || 
failure
+    RETVAL=$?
     echo
     if [ $RETVAL != 0 ]; then
         echo > /usr/share/ovirt-engine-dwh/etl/kill
diff --git a/packaging/ovirt-engine-dwh-setup.py 
b/packaging/ovirt-engine-dwh-setup.py
index 18e8ad8..0274177 100755
--- a/packaging/ovirt-engine-dwh-setup.py
+++ b/packaging/ovirt-engine-dwh-setup.py
@@ -14,6 +14,7 @@
 import logging
 import sys
 import os
+import time
 import traceback
 import common_utils as utils
 from decorators import transactionDisplay
@@ -252,6 +253,8 @@
 
             # Start Services
             utils.startEngine()
+            # Sleep for 20 secs to allow health applet to start
+            time.sleep(20)
             utils.startEtl()
 
             print "Successfully installed %s." % DWH_PACKAGE_NAME


--
To view, visit http://gerrit.ovirt.org/9277
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I608a4495c65459e0488ef298cf790ce5ab454830
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-dwh
Gerrit-Branch: master
Gerrit-Owner: Yaniv Dary <yd...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to