Eli Mesika has posted comments on this change.

Change subject: core: preserve custom db users permissions on...
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.ovirt.org/#/c/25552/2/packaging/dbscripts/dbfunc-common.sh
File packaging/dbscripts/dbfunc-common.sh:

Line 274:       dbfunc_psql_die 
--file="${DBFUNC_COMMON_DBSCRIPTS_DIR}/common_sp.sql" > /dev/null
Line 275: }
Line 276: 
Line 277: _dbfunc_common_save_custom_user_permissions() {
Line 278:       local 
permissions_file="${DBFUNC_COMMON_DBSCRIPTS_DIR}/__temp_user_custom_permissions.sql"
> we do not write into /usr any more, this should go into memory variable or 
Will fix
Line 279:       echo "Saving custom users permissions on database objects..."
Line 280:       # Looking for permissions not related to postgres, engine or 
public (custom user permissions)
Line 281:       pg_dump -U "${DBFUNC_DB_USER}" -h "${DBFUNC_DB_HOST}" -p 
"${DBFUNC_DB_PORT}" -s -w "${DBFUNC_DB_DATABASE}" |grep -v -i postgres |grep -v 
-i engine | grep -v -i public | grep -E "^GRANT" > "${permissions_file}"
Line 282: }


Line 277: _dbfunc_common_save_custom_user_permissions() {
Line 278:       local 
permissions_file="${DBFUNC_COMMON_DBSCRIPTS_DIR}/__temp_user_custom_permissions.sql"
Line 279:       echo "Saving custom users permissions on database objects..."
Line 280:       # Looking for permissions not related to postgres, engine or 
public (custom user permissions)
Line 281:       pg_dump -U "${DBFUNC_DB_USER}" -h "${DBFUNC_DB_HOST}" -p 
"${DBFUNC_DB_PORT}" -s -w "${DBFUNC_DB_DATABASE}" |grep -v -i postgres |grep -v 
-i engine | grep -v -i public | grep -E "^GRANT" > "${permissions_file}"
> we need to create wrapper to pg_dump if we want to use it, similar to the p
I had checked the SQL option , its a nightmare (especially to get the SP GRANT 
statements since you have to compose each SP with all parameters to do so , PG 
is polymorphic ....)

So we will have to get to the wrapping issue .....
Line 282: }
Line 283: 
Line 284: _dbfunc_common_restore_custom_user_permissions() {
Line 285:       local 
permissions_file="${DBFUNC_COMMON_DBSCRIPTS_DIR}/__temp_user_custom_permissions.sql"


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If4ac85dc943fcb6a8f656a8ebeb172023e71c1ec
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Yaniv Dary <yd...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to