Nir Soffer has submitted this change and it was merged.

Change subject: jobs: Autodelete
......................................................................


jobs: Autodelete

For storage jobs we like to delete finished jobs automatically after
some delay, giving engine enough time to discover the job completion
state in most cases, and allowing easy inspection of job state.  The Job
class implements now both run() and abort(), managing the state changes
and auto-deleting the job when done. Subclasses should implement _run()
and _abort().

To intergate with v2v code using old jobs framework, v2v code will have
to use _run() instead of run(). Subclass that want to enable autodelete
must override the autodelete class attribute and set it to True.

class AutodeletingJob(jobs.Job):
    autodelete = True

This feature is not relevant now for v2v jobs since engine is deleting
these jobs.

Change-Id: I4aafd2271397bd9bc4289dc1aab723398d475add
Signed-off-by: Adam Litke <ali...@redhat.com>
Signed-off-by: Nir Soffer <nsof...@redhat.com>
Reviewed-on: https://gerrit.ovirt.org/62002
Continuous-Integration: Jenkins CI
Reviewed-by: Francesco Romani <from...@redhat.com>
Reviewed-by: Piotr Kliczewski <piotr.kliczew...@gmail.com>
---
M lib/vdsm/config.py.in
M lib/vdsm/jobs.py
M tests/jobsTests.py
M vdsm/storage/sdm/api/base.py
4 files changed, 87 insertions(+), 2 deletions(-)

Approvals:
  Piotr Kliczewski: Looks good to me, but someone else must approve
  Nir Soffer: Looks good to me, approved
  Adam Litke: Verified
  Jenkins CI: Passed CI tests
  Francesco Romani: Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/62002
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4aafd2271397bd9bc4289dc1aab723398d475add
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <ali...@redhat.com>
Gerrit-Reviewer: Adam Litke <ali...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org

Reply via email to