Bug 1700759
| Summary: | engine failed schema refresh v4.3.2 -> v4.3.3 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Duarte Pousa <dnp> | ||||
| Component: | Database.Core | Assignee: | Daniel Erez <derez> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Lucie Leistnerova <lleistne> | ||||
| Severity: | urgent | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 4.3.3.3 | CC: | bugs, derez, tnisan | ||||
| Target Milestone: | ovirt-4.3.3-1 | Keywords: | Regression | ||||
| Target Release: | --- | Flags: | pm-rhel:
ovirt-4.3+
pm-rhel: blocker? |
||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | ovirt-engine-4.3.3.6 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2019-04-29 13:57:43 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: |
|
||||||
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. Update 4.3.2 -> 4.3.3 with no FK and transfers without appropriate command was successful. FK is present and image_transfers is cleaned. verified in ovirt-engine-4.3.3.6-0.1.el7.noarch |
Created attachment 1555806 [details] engine-setup log Description of problem: oVirt engine upgrade fails schema refresh when updating 4.3.2.1 -> 4.3.3 Version-Release number of selected component (if applicable): 4.3.2.1-1.el7 How reproducible: Should be happening on v4.3.2 engines upon upgrade to v4.3.3 Steps to Reproduce: 1. run engine-setup on a v4.3.2 engine instance 2. allow upgrade procedure to occur Actual results: [ INFO ] Stage: Misc configuration [ INFO ] Upgrading CA [ INFO ] Creating PostgreSQL 'ovirt_engine_history' database [ INFO ] Configuring PostgreSQL [ INFO ] Creating/refreshing DWH database schema [ INFO ] Configuring Image I/O Proxy [ INFO ] Configuring WebSocket Proxy [ INFO ] Backing up database localhost:engine to '/var/lib/ovirt-engine/backups/engine-20190417110419.32VRLE.dump'. [ INFO ] Creating/refreshing Engine database schema [ ERROR ] schema.sh: FATAL: Cannot execute sql command: --file=/usr/share/ovirt-engine/dbscripts/upgrade/04_03_0830_add_foreign_key_to_image_transfers.sql [ ERROR ] Failed to execute stage 'Misc configuration': Engine schema refresh failed Expected results: Successful update Additional info: After some digging, I think I have found the root cause for this error: oVirt 4.3.2 schema refresh scripts: /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0265_remove_foreign_key_in_image_transfers.sql /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0270_add_foreign_key_to_image_transfers.sql oVirt 4.3.3 schema refresh scripts: /usr/share/ovirt-engine/dbscripts/upgrade/04_03_0830_add_foreign_key_to_image_transfers.sql The constraint name added/removed in v4.3.2 refresh scripts has a typo "fk_image_transfers_command_enitites" vs "fk_image_transfers_command_entities": ALTER TABLE ONLY image_transfers ADD CONSTRAINT fk_image_transfers_command_enitites FOREIGN KEY (command_id) REFERENCES command_entities(command_id) ON DELETE CASCADE;