Nir Soffer has submitted this change and it was merged.
Change subject: jobs: Fix abort semantics ......................................................................
jobs: Fix abort semantics
Prior to this commit jobs.abort was treated as an synchronous operation and if it returned successfully the caller could assume that no operations related to the job were still running. Unforatunately this assumption is wrong since most underlying operations are aborted asynchronously (ie. by sending a signal to a process).
To fix this we must adopt async abort sementics in the jobs API. If a job is pending and abort is called we can simply move it to aborted state. If the job is running we move it to aborting state, call the abort helper (_abort) and return. When run() finishes it will move an aborting job to aborted. We must not autodelete or otherwise change the state of jobs with aborting status because it could mask the fact that a process is still changing the host or storage.
Change-Id: I801082c50b10cf0571210d65cd3a5cec0d282a5c Signed-off-by: Adam Litke alitke@redhat.com Reviewed-on: https://gerrit.ovirt.org/65102 Reviewed-by: Nir Soffer nsoffer@redhat.com Continuous-Integration: Jenkins CI --- M lib/vdsm/jobs.py M tests/jobsTests.py 2 files changed, 105 insertions(+), 46 deletions(-)
Approvals: Adam Litke: Verified Nir Soffer: Looks good to me, approved Jenkins CI: Passed CI tests