Ori Liel has uploaded a new change for review. Change subject: restapi: Poll Job-Id on Restore-Snapshot ......................................................................
restapi: Poll Job-Id on Restore-Snapshot Restoring a snapshot involves two Backend calls. The second call should only be issues after the first action is over, meaning the first action should run in 'blocking' mode. Until now blocking mode has been implemented by polling the status of the VDSM tasks. But this leaves room for a race condition, in cases where the VDSM tasks have completed, but Backend itself is still busy executing logic (and thus is not available yet for the second call). This patch adds the ability for actions to poll on the job-id. The 'Job' is a new Backend concept. A job is an umbrella for all VDSM tasks that are run as a result of a Backend call, plus the Backend logic itself. Polling the job status is always safer, and should in the future replace all polling of VDSM tasks status. This patch provides this ability for actions. At this point polling the job or the VDSM tasks is still presented as a choice to the programmer. Change-Id: I4bdff56b7a2c6ee95c52a4134a19bc1e05a34b19 Signed-off-by: Ori Liel <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcReturnValueBase.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/GetJobByJobIdQueryParameters.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendActionableResource.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendResource.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSnapshotResource.java 6 files changed, 85 insertions(+), 19 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/17/4117/1 -- To view, visit http://gerrit.ovirt.org/4117 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4bdff56b7a2c6ee95c52a4134a19bc1e05a34b19 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ori Liel <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
