Alex Lourie has uploaded a new change for review.

Change subject: packaging: setup: update the order of creating a local DB user
......................................................................

packaging: setup: update the order of creating a local DB user

Change-Id: I364be7a3d01e38d3d524dc648a39b7192edb960b
Bug-Url: https://bugzilla.redhat.com/1039946
Signed-off-by: Alex Lourie <alou...@redhat.com>
---
M packaging/ovirt-engine-reports-setup.py
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-reports refs/changes/68/22568/1

diff --git a/packaging/ovirt-engine-reports-setup.py 
b/packaging/ovirt-engine-reports-setup.py
index ae55915..1c6c4f7 100755
--- a/packaging/ovirt-engine-reports-setup.py
+++ b/packaging/ovirt-engine-reports-setup.py
@@ -997,6 +997,12 @@
 
             DB_EXIST, owned = getDBStatus(db_dict, TEMP_PGPASS)
             if dblocal:
+                utils.createRole(
+                    database=db_dict['dbname'],
+                    username=db_dict['username'],
+                    password=db_dict['password'],
+                    engine=db_dict['engine_user'],
+                )
                 if DB_EXIST and not owned:
                     logging.debug(
                         (
@@ -1007,12 +1013,6 @@
                             database=db_dict['dbname'],
                             reports_user=REPORTS_DB_USER,
                         )
-                    )
-                    utils.createRole(
-                        database=db_dict['dbname'],
-                        username=db_dict['username'],
-                        password=db_dict['password'],
-                        engine=db_dict['engine_user'],
                     )
                     utils.updateDbOwner(db_dict)
             elif not DB_EXIST:


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I364be7a3d01e38d3d524dc648a39b7192edb960b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-reports
Gerrit-Branch: ovirt-3.3
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