Bug 1684586

Summary: [work around] engine-setup fails upgrading due constraint violations
Product: [oVirt] ovirt-engine Reporter: John Florian <trailtotale>
Component: Setup.EngineAssignee: Dominik Holler <dholler>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.3.1CC: bugs, cameron, danken, dholler, didi, mburman, mmartinv, mperina, oliver.albl
Target Milestone: ovirt-4.3.2Keywords: Reopened
Target Release: 4.3.2.1Flags: pm-rhel: ovirt-4.3+
pm-rhel: blocker+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.3.2.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-19 10:05: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:    
Bug Blocks: 1547038, 1750657    
Attachments:
Description Flags
ovirt-engine-setup.log none

Description John Florian 2019-03-01 15:26:05 UTC
Created attachment 1539878 [details]
ovirt-engine-setup.log

Description of problem:
Tried to upgrade my engine from 4.2.8 to 4.3.1 when:

[ 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

Version-Release number of selected component (if applicable):
ovirt-engine-4.2.8.2-1.el7.noarch

How reproducible:
assumed 100%

Steps to Reproduce:
1. The usual upgrade dance:
1.1. yum install http://resources.ovirt.org/pub/yum-repo/ovirt-release43.rpm
1.2. yum update "ovirt-*-setup*"
1.3. engine-setup


Additional info:
Possibly relevant: bz1528316

Comment 1 cameron 2019-03-04 03:39:57 UTC
I also tried to upgrade my self hosted engine, but from 4.3.0 to 4.3.1 and got the same error:

[ 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, p
         Constraint violation found in  vm_interface (vmt_guid) |1

Followed this: https://www.ovirt.org/documentation/self-hosted/chap-upgrading_the_self-hosted_engine.html

# engine-upgrade-check
# yum update ovirt\*setup\*
# engine-setup

Comment 2 Yedidyah Bar David 2019-03-04 07:58:23 UTC
Thanks both of you for the report.

This seems like a duplicate of bug 1528316.

The fix for that bug says:

db: workaround for fk conflict Making fkvalidator utility ignore fk_vm_interface_vm_static,fk_vm_interface_vm_static_template foreign keys in order to pass ambiguity of two columns from vm_interface table that points to the same vm id column in vm_static. This is done only for 4.2 in 4.3 the ambiguity will be resolved by the network team.

danken, please have a look. Thanks.

Comment 3 John Florian 2019-03-04 13:54:20 UTC
For the record, I am *not* using a Hosted Engine.

@didi, thanks for the details.  If that bug is closed and I'm still seeing this, does that mean the fix hasn't yet made it into a release (i.e., 4.3.1) yet?  Or did I misread this and there's something more I need to do in the meantime?

Comment 4 Yedidyah Bar David 2019-03-05 06:37:55 UTC
(In reply to John Florian from comment #3)
> For the record, I am *not* using a Hosted Engine.
> 
> @didi, thanks for the details.  If that bug is closed and I'm still seeing
> this, does that mean the fix hasn't yet made it into a release (i.e., 4.3.1)
> yet?  Or did I misread this and there's something more I need to do in the
> meantime?

The other bug was fixed, by using a workaround, only in 4.2, and the fix
message (copied above) says that the root cause will be handled by network
team in 4.3. I am not personally a network team member (or know much about
their code in general), so would rather let them have a look first.

If upgrade is urgent for you, I guess you can apply the patch for that bug
on your system. I'd not recommend that, though. If you do, test first on
a test system (e.g. using engine-backup backup/restore).

Comment 5 Dominik Holler 2019-03-05 11:37:30 UTC
Is this possible to fix in the second build of ovirt-4.3.2?

Comment 6 John Florian 2019-03-05 13:02:59 UTC
(In reply to Yedidyah Bar David from comment #4)

> The other bug was fixed, by using a workaround, only in 4.2, and the fix
message (copied above) says that the root cause will be handled by network
team in 4.3. I am not personally a network team member (or know much about
their code in general), so would rather let them have a look first.

Thank you for the excellent clarification.

> If upgrade is urgent for you, ...

It is not urgent for me.  I just wanted to be sure I'm not holding up the show.  I often wait for x.y.3 or so to go from x.y to x.y+1 to let things stabilize a bit, but I also like to try and help do my share now and then too.

Comment 7 Dominik Holler 2019-03-06 09:04:49 UTC

*** This bug has been marked as a duplicate of bug 1547038 ***

Comment 8 Dominik Holler 2019-03-11 08:58:33 UTC
*** Bug 1685890 has been marked as a duplicate of this bug. ***

Comment 9 Michael Burman 2019-03-14 16:40:41 UTC
Verified on - rhvm-4.3.2.1-0.1.el7.noarch

Comment 10 Sandro Bonazzola 2019-03-19 10:05:19 UTC
This bugzilla is included in oVirt 4.3.2 release, published on March 19th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.2 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.

Comment 11 John Florian 2019-03-26 00:07:51 UTC
Confirming that this did resolve the issue for me.  Thanks all!