Bug 1034201 - Issues during database cleanup after upgrade
Summary: Issues during database cleanup after upgrade
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: 3.3.0
Assignee: Eli Mesika
QA Contact: sefi litmanovich
URL:
Whiteboard: infra
Depends On:
Blocks: 3.3rc1
TreeView+ depends on / blocked
 
Reported: 2013-11-25 12:20 UTC by Alon Bar-Lev
Modified: 2016-02-10 19:19 UTC (History)
11 users (show)

Fixed In Version: is27
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
sql_file (93.09 KB, application/g-zip)
2013-11-25 12:28 UTC, Kiril Nesenko
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 20498 0 None None None Never
oVirt gerrit 21894 0 None None None Never
oVirt gerrit 22022 0 None None None Never
oVirt gerrit 22170 0 None None None Never
oVirt gerrit 22188 0 None None None Never

Description Alon Bar-Lev 2013-11-25 12:20:38 UTC
2013-11-25 09:03:12 DEBUG otopi.plugins.ovirt_engine_setup.db.schema plugin.execute:446 execute-output: ('/bin/psql', '-w', '-h', 'localhost', '-p', '5432', '-U', 'engine', '-d', 'engine', '-f', '/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql') stderr:

Kiril, please attach this file sql file.

psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:22: ERROR:  must be owner of extension plpgsql

^^^^^^^^^^^^^ Eli, maybe we should disable extensions on legacy upgrade.

psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:38: ERROR:  type "all_storage_usage_rs" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:56: ERROR:  type "all_vds_group_usage_rs" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:71: ERROR:  type "async_tasks_info_rs" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:82: ERROR:  type "booleanresulttype" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:95: ERROR:  type "disks_basic_rs" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:111: ERROR:  type "fk_info_rs" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:123: ERROR:  type "get_all_commands_rs" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:143: ERROR:  type "getallfromsnapshotsbyvmid_rs" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:165: ERROR:  type "getallfromvm_pools_rs" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:176: ERROR:  type "getnamesofvmstaticdedicatedtovds_rs" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:187: ERROR:  type "getorderedvmguidsforrunmultipleactions_rs" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:200: ERROR:  type "getrepo_files_in_all_storage_pools_rs" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:211: ERROR:  type "getstoragedomainidsbystoragepoolidandstatus_rs" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:222: ERROR:  type "getsystem_statistics_rs" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:233: ERROR:  type "idtexttype" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:244: ERROR:  type "iduuidtype" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:275: ERROR:  type "networkviewclustertype" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:288: ERROR:  type "user_permissions" already exists
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:300: ERROR:  type "vds_group_usage_rs" already exists

^^^^^^^^^^^^^ Eli please provide sql to drop types, per[1]

I think it is time you take ownership on the database modules within the packaging.

We are one step farther of killing the entire dbscript... so better you involve now in maintaining the database modules.

[1] http://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=blob;f=packaging/setup/ovirt_engine_setup/database.py;hb=HEAD#l335

psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:17748: ERROR:  function "uuid_generate_v1" already exists with same argument types

^^^^^^^^^^^^^^ Eli please interpret and investigate why this was not dropped.

psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:18140: WARNING:  column "storage_pool_id" has type "unknown"
DETAIL:  Proceeding with relation creation anyway.
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:18140: WARNING:  column "storage_pool_name" has type "unknown"
DETAIL:  Proceeding with relation creation anyway.

^^^^^^^^^^^^^^^^ ?

psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:22417: WARNING:  no privileges could be revoked for "public"
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:22418: WARNING:  no privileges could be revoked for "public"
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:22419: WARNING:  no privileges were granted for "public"
psql:/var/lib/ovirt-engine/backups/engine-20131125090300.fcn1PI.sql:22420: WARNING:  no privileges were granted for "public"

^^^^^^^^^^^^^^^^ ?

Comment 1 Kiril Nesenko 2013-11-25 12:28:16 UTC
Created attachment 828625 [details]
sql_file

Comment 4 Yedidyah Bar David 2013-12-09 13:55:02 UTC
Eli, now got in cleanup after setup:

[ ERROR ] Failed to execute stage 'Misc configuration': relation "information_schema.user_defined_types" does not exist LINE 1: ... user_defined_type_name || ' ' || 'cascade;' from informatio...                                                              ^ QUERY:   select 'drop function if exists ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ') cascade;' from pg_proc inner join pg_namespace ns on ( pg_proc.pronamespace=ns.oid ) where ns.nspname = 'public' union select 'drop type if exists ' || user_defined_type_name || ' ' || 'cascade;' from information_schema.user_defined_types where user_defined_type_schema = 'public' CONTEXT:  PL/pgSQL function "oesetup_generate_drop_all_syntax" line 2 at RETURN QUERY

please check. Thanks.

Comment 5 Eli Mesika 2013-12-09 14:08:26 UTC
Please check again after the following are merged :

http://gerrit.ovirt.org/#/c/22170/
http://gerrit.ovirt.org/#/c/22188/

Comment 6 Yedidyah Bar David 2013-12-09 14:30:14 UTC
Eli - they are merged to master. Can you push to 3.3? I tried to, but had conflicts - perhaps because earlier changes are also not pushed for 3.3, not sure which.

Comment 7 Eli Mesika 2013-12-09 14:53:53 UTC
(In reply to Yedidyah Bar David from comment #6)
> Eli - they are merged to master. Can you push to 3.3? I tried to, but had
> conflicts - perhaps because earlier changes are also not pushed for 3.3, not
> sure which.

This was already pushed to 3.3 in http://gerrit.ovirt.org/#/c/22022/

Comment 8 sefi litmanovich 2013-12-16 15:16:42 UTC
Verified on RHEVM 3.3 IS27

Comment 9 Itamar Heim 2014-01-21 22:26:15 UTC
Closing - RHEV 3.3 Released

Comment 10 Itamar Heim 2014-01-21 22:29:42 UTC
Closing - RHEV 3.3 Released


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