Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1047125 - [reports] upgrade: update ownership is slow and fills the log
[reports] upgrade: update ownership is slow and fills the log
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-reports (Show other bugs)
3.3.0
Unspecified Unspecified
high Severity medium
: ---
: 3.3.0
Assigned To: Yedidyah Bar David
Tareq Alayan
integration
:
Depends On:
Blocks: rhev3.3ga
  Show dependency treegraph
 
Reported: 2013-12-29 04:48 EST by Yedidyah Bar David
Modified: 2015-09-22 09 EDT (History)
11 users (show)

See Also:
Fixed In Version: IS31 - rhevm-reports-3.3.0-28.el6ev.noarch.rpm
Doc Type: Bug Fix
Doc Text:
When upgrading from 3.2 to 3.3 with a local database, ownership of all database objects is changed from 'postgres' to 'engine_reports'. This is done by running the pg_dump command to search for the postgres owner, which can fill up the disk with logs if the database size is large. Furthermore, the SQL commands for changing the ownership are run individually, which can be slow. Now, pg_dump only retrieves only the schema, which is sufficient for this purpose, and all SQL commands are run in a single PSQL command.
Story Points: ---
Clone Of: 1046676
Environment:
Last Closed: 2014-01-21 09:57:21 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
logs (62.35 KB, application/x-tar-gz)
2014-01-17 04:55 EST, Tareq Alayan
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 22708 None None None Never
oVirt gerrit 23047 None None None Never
Red Hat Product Errata RHBA-2014:0035 normal SHIPPED_LIVE rhevm-reports 3.3 bug fix and enhancement update 2014-01-21 14:53:30 EST

  None (edit)
Description Yedidyah Bar David 2013-12-29 04:48:58 EST
+++ This bug was initially created as a clone of Bug #1046676 +++

Description of problem:

On upgrade from 3.2 to 3.3 with a local database, we change the ownership of all db objects from 'postgres' to 'engine_reports'. We do this by running 'pg_dump', searching the output for 'Owner postgres', then create a set of sql commands to change the ownership and run them, each in its own psql command. This has two problems:

1. pg_dump's output also goes to the log, and if the database is large, the log might feel up the disk.
2. Running each command in its own psql is slow

Proposed solution:

1. We should add '-s' to pg_dump to dump only the schema, that's enough for that purpose
2. We should run all the SQL commands in a single psql command.

This is less severe than bz #1046676 because the database in reports is not expected to be large.
Comment 1 Yaniv Lavi 2013-12-29 11:11:13 EST
So the log will list the table content?
This is a blocker, since passwords will also appear.


Yaniv
Comment 2 Yedidyah Bar David 2013-12-31 05:21:51 EST
Yes, they appear obfuscated, but I agree it's a blocker.
Comment 4 Tareq Alayan 2014-01-17 04:54:22 EST
verified on rhevm-reports-3.3.0-28.el6ev.noarch rhevm-dwh-3.3.0-28.el6ev.noarch
see logs attached.
/usr/bin/pg_dump -s rhevmreports
Comment 5 Tareq Alayan 2014-01-17 04:55:39 EST
Created attachment 851496 [details]
logs
Comment 7 errata-xmlrpc 2014-01-21 09:57:21 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0035.html

Note You need to log in before you can comment on or make changes to this bug.