From Tal Nisan <tnisan(a)redhat.com>:
Tal Nisan has submitted this change and it was merged.
Change subject: core: Fix storage domain creation rollback on failure
......................................................................
core: Fix storage domain creation rollback on failure
When adding a new storage domain fails with an exception, the compensation
mechanism should kick in and rollback all newly created entities, among
them the storage domain, however since patch e7b5093 introduced, a command
execution was added as a part of the flow that adds a default disk profile.
This command is using the same context of the parent command resulting in
clearing the old compensation context and upon failure only the disk
profile entity creation is rolled back and the storage domain entity
remains in the DB resulting in the UI inability to remove the connection
and an unusable storage domain entity existing in the database.
This patch fixes it by cloning the context to the add disk profile command
and detaching it from the parent context.
Change-Id: I3d42062313792f680d0f4e6e51ee5837f34a08ec
Bug-Url:
https://bugzilla.redhat.com/1404601
Signed-off-by: Tal Nisan <tnisan(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/domain/StorageDomainCommandBase.java
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Tal Nisan: Verified; Looks good to me, approved; Passed CI tests
--
To view, visit
https://gerrit.ovirt.org/71170
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3d42062313792f680d0f4e6e51ee5837f34a08ec
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.1.0.z
Gerrit-Owner: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>