Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1115928

Summary: DB upgrade 3.4.2 -> 3.5 beta1 failed
Product: [Retired] oVirt Reporter: Dan Kenigsberg <danken>
Component: ovirt-engine-coreAssignee: Eli Mesika <emesika>
Status: CLOSED NOTABUG QA Contact: Pavel Stehlik <pstehlik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.5CC: acathrow, bugs, danken, gklein, iheim, oourfali, yeylon
Target Milestone: ---Keywords: Triaged
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-21 11:29:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine.sql dump none

Description Dan Kenigsberg 2014-07-03 11:02:56 UTC
Description of problem:
I've attempted to upgrade my all-in-one Engine to 3.5.0 beta, and encountered the following error during the final engine-setup

psql:/usr/share/ovirt-engine/dbscripts/upgrade/03_05_0050_event_notification_methods.sql:2: ERROR:  constraint "fk_event_subscriber_event_notification_methods" of relation "event_subscriber" does not exist
FATAL: Cannot execute sql command: --file=/usr/share/ovirt-engine/dbscripts/upgrade/03_05_0050_event_notification_methods.sql


an attempt to fix the issue failed:
# su - postgres
-bash-4.1$ psql engine
psql (8.4.20)
Type "help" for help.

engine=# ALTER TABLE ONLY event_subscriber
engine-#     ADD CONSTRAINT fk_event_subscriber_event_notification_methods FOREIGN KEY (method_id) REFERENCES event_notification_methods(method_id) ON DELETE CASCADE;
ERROR:  relation "event_notification_methods" does not exist


Version-Release number of selected component (if applicable):
ovirt-engine-setup-3.5.0-0.0.master.20140629172257.git0b16ed7.el6.noarch

How reproducible:
Tried only on my host

Comment 1 Eli Mesika 2014-07-20 12:31:46 UTC
Unable to reproduce, please run the following command on your 3.4.2 DB 

>pg_dump -E UTF8  --disable-dollar-quoting  --disable-triggers --format=p  -U engine  -f engine.sql  engine

Then attach the resulted engine.sql to this BZ

Comment 2 Dan Kenigsberg 2014-07-21 09:28:03 UTC
Created attachment 919570 [details]
engine.sql dump

requested dump, after setting ident->trust in /var/lib/pgsql/data/pg_hba.conf

Comment 3 Eli Mesika 2014-07-21 11:26:31 UTC
The database is corrupted , it misses some tables and constraints.
I have no idea how this DB loses those schema objects 
Since we have no additional cases on this kind of upgrade, I recommend closing the BZ

Comment 4 Oved Ourfali 2014-07-21 11:29:40 UTC
Closing. Please reopen if it happens again.