Bug 1259345 - engine-cleanup fails due to error 'must be owner of ...'
engine-cleanup fails due to error 'must be owner of ...'
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine
Classification: oVirt
Component: Setup.Engine (Show other bugs)
---
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ovirt-3.6.0-rc
: 3.6.0
Assigned To: Martin Perina
Lukas Svaty
infra
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-02 08:28 EDT by Martin Perina
Modified: 2016-02-10 14:14 EST (History)
10 users (show)

See Also:
Fixed In Version: 3.6.0-12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-04 06:19:12 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑3.6.0+
ylavi: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 45671 master MERGED setup: During cleanup drop only engine schemas Never
oVirt gerrit 45783 ovirt-engine-3.6 MERGED setup: During cleanup drop only engine schemas Never

  None (edit)
Description Martin Perina 2015-09-02 08:28:47 EDT
Description of problem:

When executing engine-cleanup on F22, it fails with error:

 [ ERROR ] Failed to execute stage 'Misc configuration': must be owner of schema pg_catalog

The issue is that we try to remove all schemas from returned from 'select * from information_schema.schemata' and it return also system schemas (on Centos 6/7 this query returns only schemas owned by logged in user).


Version-Release number of selected component (if applicable):

oVirt 3.6 beta3

How reproducible:

100%

Steps to Reproduce:
1. Install and configure engine using engine-setup
2. After successful setup try to remove all engine configuration using engine-cleanup

Actual results:

engine-cleanup fails

Expected results:

engine-cleanup should be successful

Additional info:
Comment 1 Yedidyah Bar David 2015-09-06 04:32:24 EDT
Only now saw [1].

If that was enough for dropping the schema created for aaa-jdbc, and you didn't have to individually drop each object in it, keeping the conditions elsewhere to drop objects only from schema 'public', why isn't it enough to replace the entire logic dropping our objects with:

drop SCHEMA public cascade;

?

(Setting needinfo on Eli although 'you' above is Martin).

[1] https://gerrit.ovirt.org/44553
Comment 2 Eli Mesika 2015-09-06 04:39:57 EDT
(In reply to Yedidyah Bar David from comment #1)
> Only now saw [1].
> 
> If that was enough for dropping the schema created for aaa-jdbc, and you
> didn't have to individually drop each object in it, keeping the conditions
> elsewhere to drop objects only from schema 'public', why isn't it enough to
> replace the entire logic dropping our objects with:
> 
> drop SCHEMA public cascade;

The 'public' schema is created by the database engine and is actually the default schema 
for example , the following are equivalent :

CREATE TABLE products ( ... );

and

CREATE TABLE public.products ( ... );

Therefor, when cleanup is used it should drop each object specifically
Comment 3 Lukas Svaty 2015-10-15 08:09:20 EDT
verified in rhevm-setup-base-3.6.0.1-0.1.el6.noarch
Comment 4 Sandro Bonazzola 2015-11-04 06:19:12 EST
oVirt 3.6.0 has been released on November 4th, 2015 and should fix this issue.
If problems still persist, please open a new BZ and reference this one.

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