Bug 1547016 - engine-setup clears engine database on rollback if failure is at/after schema update
Summary: engine-setup clears engine database on rollback if failure is at/after schema...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Setup.Engine
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.2.2
: ---
Assignee: Yedidyah Bar David
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks: 1547018
TreeView+ depends on / blocked
 
Reported: 2018-02-20 11:06 UTC by Yedidyah Bar David
Modified: 2018-03-29 11:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1547018 (view as bug list)
Environment:
Last Closed: 2018-03-29 11:03:31 UTC
oVirt Team: Integration
Embargoed:
rule-engine: ovirt-4.2+
rule-engine: blocker+
lleistne: testing_plan_complete+
sbonazzo: devel_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 87928 0 master MERGED packaging: setup: postgres95: Do not clear db on upgrade rollback 2018-02-20 15:00:18 UTC
oVirt gerrit 87951 0 ovirt-engine-4.2 MERGED packaging: setup: postgres95: Do not clear db on upgrade rollback 2018-02-20 16:09:44 UTC

Description Yedidyah Bar David 2018-02-20 11:06:32 UTC
Description of problem:

The fix for bug 1492138 is not enough. Currently, if failure is after adding SchemaTransaction, abort clears the database.

Need to check what's the best solution. Definitely, if we do not backup, and it's not a new database, we should not clear.

Comment 1 Yedidyah Bar David 2018-02-20 15:03:08 UTC
QE: Reproduction/verification flows:

1. Install and Setup 4.1 engine+dwh, also install otopi-debug-plugins if you want (see below)
2. Update setup packages to 4.2
3. Run engine-setup and fail it. Please test with different fail points. You can automate this using the force_fail plugin of otopi-debug-plugins using one of these (please try all, please automate for the future):

OTOPI_FORCE_FAIL_STAGE=STAGE_EARLY_MISC OTOPI_FORCE_FAIL_PRIORITY=PRIORITY_LOW engine-setup

OTOPI_FORCE_FAIL_STAGE=STAGE_MISC OTOPI_FORCE_FAIL_PRIORITY=PRIORITY_HIGH engine-setup

OTOPI_FORCE_FAIL_STAGE=STAGE_MISC OTOPI_FORCE_FAIL_PRIORITY=PRIORITY_DEFAULT engine-setup

OTOPI_FORCE_FAIL_STAGE=STAGE_MISC OTOPI_FORCE_FAIL_PRIORITY=PRIORITY_LOW engine-setup

4. engine-setup, also if rolling back successfully, leaves all services stopped. So:

systemctl start ovirt-engine
systemctl start ovirt-engine-dwhd

5. Verify that both services eventually managed to come up and work well. You can try to login, check logs etc.

Comment 2 Yedidyah Bar David 2018-02-22 07:59:38 UTC
Patch was merged after tagging the latest build, will have to wait for next one.

Comment 3 Lucie Leistnerova 2018-03-07 16:33:52 UTC
I ran stage fails from 3. in Comment 1. Databases are not empty after rollback and services work ok.

verified in ovirt-engine-setup-4.2.2.2-0.1.el7.noarch

Comment 4 Sandro Bonazzola 2018-03-29 11:03:31 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

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


Note You need to log in before you can comment on or make changes to this bug.