Nir Soffer has posted comments on this change.
Change subject: jobs: Fix abort semantics ......................................................................
Patch Set 2: Code-Review-1
(2 comments)
https://gerrit.ovirt.org/#/c/65102/2/lib/vdsm/jobs.py File lib/vdsm/jobs.py:
Line 129: Line 130: def abort(self): Line 131: with self._status_lock: Line 132: if self.status == STATUS.PENDING: Line 133: self._status = STATUS.ABORTED Maybe comment only here:
# We autodelete only in pending state, otherwise we autodelete in run() Line 134: if self.autodelete: Line 135: self._autodelete() Line 136: elif self.status == STATUS.RUNNING: Line 137: self._status = STATUS.ABORTING
Line 136: elif self.status == STATUS.RUNNING: Line 137: self._status = STATUS.ABORTING Line 138: logging.info("Aborting job %r...", self.id) Line 139: self._abort() Line 140: # Autodelete is handled by run when the operation is terminated Strange that we comment about auto delete only in RUNNING state, and ignore ABORTING state. Looks like an error that someone will try to "fix". Line 141: elif self.status == STATUS.ABORTING: Line 142: logging.info("Retrying abort job %r...", self.id) Line 143: self._abort() Line 144: else: