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

Bug 1839665

Summary: Run engine-setup with answerfile fails on add_fk_to_vm_checkpoint_disk_map.sql
Product: [oVirt] ovirt-engine Reporter: Ilan Zuckerman <izuckerm>
Component: BLL.StorageAssignee: Tal Nisan <tnisan>
Status: CLOSED NOTABUG QA Contact: Avihai <aefrat>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.4.1CC: bugs, didi, eshenitz
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-25 10:58:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Jenkins + engine setup logs none

Description Ilan Zuckerman 2020-05-25 08:31:50 UTC
Created attachment 1691751 [details]
Jenkins + engine setup logs

Description of problem:
When executed Jenkins flow for upgrading the 4.4 env to latest build rhv-4.4.1-1 , The upgrade flow fails at stage of "Run engine-setup with answerfile":

schema.sh: FATAL: Cannot execute sql command: --file=/usr/share/ovirt-engine/dbscripts/upgrade/04_04_0650_add_fk_to_vm_checkpoint_disk_map.sql\n[ ERROR ] Failed to execute stage 'Misc configuration': Engine schema refresh failed\n[ INFO  ]

Unfortunately i couldnt take the table contents because the env was already re-provisioned.

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

How reproducible:
Reproduced only once when running the Jenkins upgrade flow.

Attaching engine setup std out print [1] and full log of the responsible Jenkins job [2], as well as the link to it [3]

[1] engine_setup_stdout.txt
[2] jenkins_job.log
[3] https://rhv-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/rhv-ge-deploy-4.4/1066/consoleFull

Comment 1 Eyal Shenitzky 2020-05-25 09:56:56 UTC
Ilan, maybe you had some dirty entities on vm_checkpoints and vm_checkpoint_disk_map.
So when the FK was added some entities didn't have a match so it fails.

Can you share the DB dump/content?

Comment 2 Ilan Zuckerman 2020-05-25 10:50:34 UTC
Unfortunately i do not have a live DB from this failure. The env was reprovisioned.

Comment 3 Eyal Shenitzky 2020-05-25 10:55:14 UTC
Did you used this env for incremental backup testing?

Comment 4 Ilan Zuckerman 2020-05-25 10:56:17 UTC
yes i did

Comment 5 Eyal Shenitzky 2020-05-25 10:58:44 UTC
I see.
Closing this bug for now since this issue is expected due to the tests you did 
on incremental backup feature which is a tech-preview.

Please re-open this bug if necessary.

Comment 6 Eyal Shenitzky 2020-05-25 11:23:51 UTC
Also, If someone encounters it, the WA will be to align the vm_checkpoints table with 
vm_checkpoint_disks_map and see that for each checkpoint_id in vm_checkpoint_disks_map 
we have a corresponding checkpoint_id in vm_checkpoints.

Fixed by - https://gerrit.ovirt.org/#/c/109101/