Bug 1364804 - [engine-backend] Compensation context data is cleared although the data wasn't reverted on parent-child command scenario
Summary: [engine-backend] Compensation context data is cleared although the data wasn'...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Infra
Version: 4.0.2
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.0.4
: 4.0.4
Assignee: Ravi Nori
QA Contact: Ravi Nori
URL:
Whiteboard:
Depends On: 1359788
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-07 17:42 UTC by Liron Aravot
Modified: 2016-09-26 10:57 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1359788
Environment:
Last Closed: 2016-09-26 10:57:13 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.0.z+
mgoldboi: planning_ack+
mperina: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 62194 0 master MERGED engine : Compensation context data is cleared although the data wasn't reverted on parent-child command scenario 2016-08-16 10:46:48 UTC
oVirt gerrit 62394 0 ovirt-engine-4.0 MERGED engine : Compensation context data is cleared although the data wasn't reverted on parent-child command scenario 2016-08-17 08:57:25 UTC

Description Liron Aravot 2016-08-07 17:42:00 UTC
Description of problem:
When the compensation is passed to a child command from a parent command, on failure of the child command the data registered on the compensation context will be cleared although it wasn't actually reverted.

Detailed description:
1.When the compensation context is created for the parent command, it's created with the parent command id (so entities registered to it are registered with the parent id). 

2. Compensation data is registered and saved to the db using the parent command id.

3. The child command fails.

2. We attempt to revert on the failure of the child command, the data to revert is queried from the db using the child command id, as the entities were registered with the parent id no results returns and no data is reverted.

3. All the compensation data is cleared, so the entities registered with the parent id are cleared as well.

4. Compensation context rollback is running for the parent command, as the compensation data was deleted from the db there's nothing to revert.

How reproducible:
Always

Steps to Reproduce:
1. Create new data center, it'll be added in uninitialized status.
2. Add cluster/host and activate the host
3. Make sure that CreateStoragePoolVDS command will fail (can be done by simulating a failure)


Actual results:
The compensation data isn't reverted.


Expected results:
The compnsation data should be reverted.
+++ This bug was initially created as a clone of Bug #1359788 +++

Comment 1 Red Hat Bugzilla Rules Engine 2016-08-07 17:42:09 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 2 Red Hat Bugzilla Rules Engine 2016-08-07 17:42:35 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 4 Martin Perina 2016-08-16 10:47:32 UTC
Moving back to POST as we need to backport to ovirt-engine-4.0

Comment 5 Gil Klein 2016-09-26 10:57:13 UTC
Closed as a Code change


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