Sandro Bonazzola has uploaded a new change for review.

Change subject: packaging: setup: set log file for db upgrade
......................................................................

packaging: setup: set log file for db upgrade

In engine-setup-2 when calling upgrade.sh specify also
-l option avoiding the creation of the log file inside
dbscript dir.

Added the needed variables for obtaining the log
directory from Makefile.

Change-Id: Ic04a4976fdc2eaa89c245366a3fecdd52220fc91
Signed-off-by: Sandro Bonazzola <[email protected]>
---
M packaging/setup/ovirt_engine_setup/config.py.in
M packaging/setup/ovirt_engine_setup/constants.py
M packaging/setup/plugins/ovirt-engine-setup/db/schema.py
3 files changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/66/16366/1

diff --git a/packaging/setup/ovirt_engine_setup/config.py.in 
b/packaging/setup/ovirt_engine_setup/config.py.in
index 33b6533..2beaca5 100644
--- a/packaging/setup/ovirt_engine_setup/config.py.in
+++ b/packaging/setup/ovirt_engine_setup/config.py.in
@@ -31,6 +31,7 @@
 DISPLAY_VERSION = '@DISPLAY_VERSION@'
 RPM_VERSION = '@RPM_VERSION@'
 RPM_RELEASE = '@RPM_RELEASE@'
+ENGINE_LOG_DIR = '@ENGINE_LOG@'
 
 
 # vim: expandtab tabstop=4 shiftwidth=4
diff --git a/packaging/setup/ovirt_engine_setup/constants.py 
b/packaging/setup/ovirt_engine_setup/constants.py
index 79d8001..4aef6a2 100644
--- a/packaging/setup/ovirt_engine_setup/constants.py
+++ b/packaging/setup/ovirt_engine_setup/constants.py
@@ -79,6 +79,7 @@
         OVIRT_ENGINE_DATADIR,
         'bin',
     )
+    OVIRT_ENGINE_LOG_DIR = config.ENGINE_LOG_DIR
 
     OVIRT_OVIRT_SETUP_CONFIG_FILE = config.ENGINE_SETUP_CONFIG
 
diff --git a/packaging/setup/plugins/ovirt-engine-setup/db/schema.py 
b/packaging/setup/plugins/ovirt-engine-setup/db/schema.py
index 7062ab6..33c4e2a 100644
--- a/packaging/setup/plugins/ovirt-engine-setup/db/schema.py
+++ b/packaging/setup/plugins/ovirt-engine-setup/db/schema.py
@@ -19,6 +19,7 @@
 """Schema plugin."""
 
 
+import datetime
 import os
 import gettext
 _ = lambda m: gettext.dgettext(message=m, domain='ovirt-engine-setup')
@@ -166,6 +167,11 @@
                 '-p', str(self.environment[osetupcons.DBEnv.PORT]),
                 '-u', self.environment[osetupcons.DBEnv.USER],
                 '-d', self.environment[osetupcons.DBEnv.DATABASE],
+                '-l', os.path.join(
+                    osetupcons.FileLocations.OVIRT_ENGINE_LOG_DIR,
+                    'engine-db-upgrade-%s.log' %
+                    datetime.datetime.now().strftime('%Y%m%d%H%M%S'),
+                ),
             ]
             if self.environment[
                 osetupcons.CoreEnv.DEVELOPER_MODE


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic04a4976fdc2eaa89c245366a3fecdd52220fc91
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to