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

Bug 890179

Summary: engine [UPGRADE]: upgrade fails on drop for new table added: fk_vm_interface_vm_static_template
Product: Red Hat Enterprise Virtualization Manager Reporter: Dafna Ron <dron>
Component: ovirt-engineAssignee: Eli Mesika <emesika>
Status: CLOSED NOTABUG QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.1.0CC: dyasny, iheim, lpeer, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---Keywords: Regression
Target Release: 3.1.1   
Hardware: x86_64   
OS: Linux   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-26 09:28:59 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
log none

Description Dafna Ron 2012-12-25 15:01:05 UTC
Created attachment 668939 [details]
log

Description of problem:

we tried to upgrade rhevm-3 from si25.1 to si25.2
the upgrade failed with the following error: 

HINT:  Use the escape string syntax for escapes, e.g., E'\r\n'.
psql:upgrade/03_01_1451_add_fk_vm_interface_vm_static_template.sql:2: ERROR:  insert or update on table "vm_interface" violates foreign key constraint "fk_vm_interface_vm_static_template"
DETAIL:  Key (vmt_guid)=(5439c205-ea84-4b3a-ab4d-df66749597df) is not present in table "vm_static".

Eli investigated and the table is a new table added which is why it failed to clean the key. 

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

si25.1 -> si25.2

How reproducible:

Steps to Reproduce:
1. add a fk to table: fk_vm_interface_vm_static_template while working on si25.1
2. try to upgrade to si25.2
3.
  
Actual results:

we will fail upgrade

Expected results:

we should not fail upgrade

Additional info: upgrade log

Comment 4 Eli Mesika 2012-12-26 09:27:25 UTC
http://gerrit.ovirt.org/#/c/10380/

Comment 5 Yaniv Kaul 2012-12-26 09:28:59 UTC
CLOSED-NOTABUG:
Since there was no version lock on RC (separate known bug), when we upgraded Jboss to 6.0.1, RHEVM was also upgraded from RC (SI24.4 - rhevm-backend-3.1.0-31.el6ev.noarch) to GA (SI24.5 - rhevm-backend-3.1.0-32.el6ev.noarch) using 'yum update', without running rhevm-upgrade. 
Therefore, the script was not executed.