Bug 1688781

Summary: [downstream clone - 4.4.0] Upgrade from 4.3 to 4.4 will fail if there are versioned templates in database
Product: Red Hat Enterprise Virtualization Manager Reporter: RHV bug bot <rhv-bugzilla-bot>
Component: ovirt-engineAssignee: Dominik Holler <dholler>
Status: CLOSED ERRATA QA Contact: Michael Burman <mburman>
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: ahadas, alkaplan, bugs, danken, dholler, didi, emesika, eraviv, giorgio, jbelka, jiri.slezka, mburman, michal.skrivanek, mmartinv, mperina, mtessun, myakove, oliver.albl, rdlugyhe, Rhev-m-bugs, tjelinek, trailtotale, ylavi
Target Milestone: ovirt-4.4.0Keywords: Reopened, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, when a vNIC had two references to a VM, if the VM is a template, one reference was used. Otherwise, the other reference was used. This construct confused the constraint checker of the database and enabled inconsistencies. Bug 1528316 and bug 1684586 disabled the check of this constraint during upgrades. The current release fixes this issue by merging both references into a single one, which has to be set. As a result, the improved data structure in the database matches the database constraints and prevents inconsistencies.
Story Points: ---
Clone Of: 1547038 Environment:
Last Closed: 2020-02-13 15:24:47 UTC Type: ---
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: 1547038    
Bug Blocks:    

Description RHV bug bot 2019-03-14 12:34:20 UTC
+++ This bug is an upstream to downstream clone. The original bug is: +++
+++   bug 1547038 +++
======================================================================

+++ 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.

(Originally by danken)

Comment 2 RHV bug bot 2019-03-14 12:34:27 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.

(Originally by rule-engine)

Comment 3 RHV bug bot 2019-03-14 12:34:29 UTC
Is this a bug or a feature?

(Originally by Yaniv Kaul)

Comment 4 RHV bug bot 2019-03-14 12:34:31 UTC
This is technical debt of normalizing the db and aligning the engine accordingly, with no customer facing effects (hopefully...)

(Originally by Eitan Raviv)

Comment 5 RHV bug bot 2019-03-14 12:34:33 UTC
This seems like a risky change with limited benefit, therefore for now.

(Originally by ylavi)

Comment 6 RHV bug bot 2019-03-14 12:34:35 UTC
*** Bug 1684586 has been marked as a duplicate of this bug. ***

(Originally by Dominik Holler)

Comment 7 RHV bug bot 2019-03-14 12:34:37 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

(Originally by Dominik Holler)

Comment 8 RHV bug bot 2019-03-14 12:34:38 UTC
*** Bug 1685890 has been marked as a duplicate of this bug. ***

(Originally by Dominik Holler)

Comment 9 RHV bug bot 2019-03-14 12:34:40 UTC
Removing CodeChange and updating title as this is an upgrade blocker

(Originally by Martin Perina)

Comment 10 RHV bug bot 2019-03-14 12:34:42 UTC
Ahh, sorry I've missed that we have BZ1684586 to track that issue in 4.3

(Originally by Martin Perina)

Comment 11 RHV bug bot 2019-03-14 12:34:44 UTC
*** Bug 1687707 has been marked as a duplicate of this bug. ***

(Originally by Martin Perina)

Comment 12 Michael Burman 2019-10-27 12:26:18 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 16 errata-xmlrpc 2020-02-13 15:24:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHSA-2020:0498