Bug 1547038

Summary: Upgrade from 4.3 to 4.4 will fail if there are versioned templates in database
Product: [oVirt] ovirt-engine Reporter: Dan Kenigsberg <danken>
Component: BLL.NetworkAssignee: Dominik Holler <dholler>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: high Docs Contact:
Priority: high    
Version: 4.3.0CC: ahadas, alkaplan, bugs, danken, dholler, didi, emesika, eraviv, giorgio, jbelka, jiri.slezka, mburman, michal.skrivanek, mmartinv, mperina, myakove, oliver.albl, tjelinek, trailtotale, ylavi
Target Milestone: ovirt-4.4.0Keywords: Reopened, ZStream
Target Release: ---Flags: pm-rhel: ovirt-4.4+
pm-rhel: blocker+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: A vNIC had two references to a VM. One was used to reference the VM if the VM is a template, else the other reference was used. Consequence: This construct confused the constraint checker of the database and enabled inconsistency. Bug 1528316 and bug 1684586 disabled the check of this constraint during upgrades/ Fix: This change merges both references into a single one, which has to be set. Result: The improved data structure in the db is matches the db constraints and prevents inconsistency.
Story Points: ---
Clone Of: 1528316
: 1687707 1688781 (view as bug list) Environment:
Last Closed: 2020-05-20 20:04:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1528316, 1684586    
Bug Blocks: 1687707, 1688781, 1750657    

Description Dan Kenigsberg 2018-02-20 11:54:26 UTC
+++ This bug was initially created as a clone of Bug #1528316 +++


As explained in https://bugzilla.redhat.com/show_bug.cgi?id=1528316#c4 our vm_interface has two fields (vm_guid and vmt_guid) referring to the same table, and we should eliminate this.

Comment 1 Red Hat Bugzilla Rules Engine 2018-02-20 11:54:41 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 2 Yaniv Kaul 2018-02-21 08:11:31 UTC
Is this a bug or a feature?

Comment 3 eraviv 2018-02-22 06:54:53 UTC
This is technical debt of normalizing the db and aligning the engine accordingly, with no customer facing effects (hopefully...)

Comment 4 Yaniv Lavi 2018-08-29 08:12:03 UTC
This seems like a risky change with limited benefit, therefore for now.

Comment 5 Dominik Holler 2019-03-06 09:04:49 UTC
*** Bug 1684586 has been marked as a duplicate of this bug. ***

Comment 6 Dominik Holler 2019-03-06 14:51:50 UTC
Steps to Reproduce on oVirt 4.3:
1. Create a VM with a vNIC
2. Create a template of this VM
3. Create a subversion of the template
4. Run engine-setup


Actual results:
[ INFO  ] Checking the Engine database consistency
[ ERROR ] Failed to execute stage 'Setup validation': Failed checking Engine database: an exception occurred while validating the Engine database, please check the logs for getting more info:
         Constraint violation found in  vm_interface (vmt_guid) |1


Expected results:
engine-setup succeeds

Comment 7 Dominik Holler 2019-03-08 22:02:23 UTC
*** Bug 1685890 has been marked as a duplicate of this bug. ***

Comment 8 Martin Perina 2019-03-12 07:54:33 UTC
Removing CodeChange and updating title as this is an upgrade blocker

Comment 9 Martin Perina 2019-03-12 08:03:38 UTC
Ahh, sorry I've missed that we have BZ1684586 to track that issue in 4.3

Comment 10 Martin Perina 2019-03-12 08:04:41 UTC
*** Bug 1687707 has been marked as a duplicate of this bug. ***

Comment 12 Dominik Holler 2019-03-26 09:22:20 UTC
QE is required to test ovirt-dwh to ensure the related code change does not introduce regressions.

Comment 13 Michael Burman 2019-10-27 12:25:20 UTC
Verified on - rhvm-4.4.0-0.4.master.el7.noarch
rhvm-4.3.7.0-0.1.el7.noarch >> rhvm-4.4.0-0.4.master.el7.noarch

Comment 14 Sandro Bonazzola 2020-05-20 20:04:19 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

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