Description of problem: Currently, the rest-api support asynchronous requests only for actions that invoke commands containing vdsm tasks. The support should be extended for commands based on the CoCo infrastructure. I.e. when invoking such command asynchronously, a '202 Accepted' status should be returned to the user. To support polling, a new PollingType could be added along with the relevant logic to fetch tasks statuses. Version-Release number of selected component (if applicable): 3.6 Additional info: AbstractBackendActionableResource -> doAction() method determines whether the request is async according to 'getHasAsyncTasks' flag.
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
(In reply to Daniel Erez from comment #0) > Description of problem: > Currently, the rest-api support asynchronous requests only for actions that > invoke commands containing vdsm tasks. The support should be extended for > commands based on the CoCo infrastructure. I.e. when invoking such command > asynchronously, a '202 Accepted' status should be returned to the user. To > support polling, a new PollingType could be added along with the relevant > logic to fetch tasks statuses. > I'd rather not adding another polling type for the sake of commands with callbacks. We should use the Job polling type instead: If an action/command in the system should be monitored, it should create itself a job to be polled by and implement the job lifecycle as part of the command flow. The infrastructure could take care of not terminating commands with callback, only as part of the commands endAction(), which suppose to be the last step of the command. > > Version-Release number of selected component (if applicable): > 3.6 > > Additional info: > AbstractBackendActionableResource -> doAction() method determines whether > the request is async according to 'getHasAsyncTasks' flag.
*** Bug 1315874 has been marked as a duplicate of this bug. ***
Oved - please triage for 4.2/4.3 or close.
I also encountered the need for async support using CoCo when refactoring ExportVmCommand and ImportVmCommand to use CoCo. I would suggest not to expose the commands and callbacks in the REST-API, but instead to consider the callback status when REST-API decides if a request is async or not (instead of relying on the direct tasks list)
This RFE is for rest api async requests. What you're asking is something else. Please open an RFE specifying what you need.