Alex Lourie has uploaded a new change for review.

Change subject: packaging: update order of db backup
......................................................................

packaging: update order of db backup

Change-Id: Ide1d9635ec51d30b6a508b5319fc6c4f399cb44f
Signed-off-by: Alex Lourie <alou...@redhat.com>
---
M packaging/fedora/setup/engine-upgrade.py
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/81/8281/1

diff --git a/packaging/fedora/setup/engine-upgrade.py 
b/packaging/fedora/setup/engine-upgrade.py
index cc4210e..03a731f 100755
--- a/packaging/fedora/setup/engine-upgrade.py
+++ b/packaging/fedora/setup/engine-upgrade.py
@@ -861,8 +861,6 @@
         # Backup DB
         if isUpdateRelatedToDb(rhyum):
             stopDbRelatedServices(etlService, notificationService)
-            runFunc([db.backup], MSG_INFO_BACKUP_DB)
-            runFunc([[db.rename, DB_NAME_TEMP]], MSG_INFO_RENAME_DB)
 
     except Exception as e:
         print e
@@ -870,6 +868,12 @@
 
     # In case of failure, do rollback
     try:
+
+        # Backup DB
+        if isUpdateRelatedToDb(rhyum):
+            runFunc([db.backup], MSG_INFO_BACKUP_DB)
+            runFunc([[db.rename, DB_NAME_TEMP]], MSG_INFO_RENAME_DB)
+
         # yum update
         runFunc(upgradeFunc, MSG_INFO_YUM_UPDATE)
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide1d9635ec51d30b6a508b5319fc6c4f399cb44f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alex Lourie <alou...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to