Liron Aravot has submitted this change and it was merged.
Change subject: core: persist before validate() only when there is a parent with cb
......................................................................
core: persist before validate() only when there is a parent with cb
Currently we persist the command entity before the validate() check and on
failure the command status is updated to ENDED_WITH_FAILURE.
We do that so that When there is a parent command with a callback, it will be
able to detect that the child command execution failed on that phase. Additionally,
the parent is responsible to clear the command hirerchy.
When there is no parent command, the command entity will never be cleared/monitored.
In this patch the logic is changed so that the command is persisted before the CDA
phase only in case there's a parent with a CB, otherwise it'll be persisted on
the
execution phase.
Change-Id: Iae96cb414677c970c91ef860824d2a5ca981d861
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=1352825
Signed-off-by: Liron Aravot <laravot(a)redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/CommandBaseTest.java
2 files changed, 22 insertions(+), 5 deletions(-)
Approvals:
Moti Asayag: Looks good to me, approved
Liron Aravot: Verified; Passed CI tests
--
To view, visit
https://gerrit.ovirt.org/60346
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iae96cb414677c970c91ef860824d2a5ca981d861
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <laravot(a)redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot(a)redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag(a)redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>