Nir Soffer has posted comments on this change. Change subject: jobs: Allow run and abort only from valid states ......................................................................
Patch Set 2: (1 comment) https://gerrit.ovirt.org/#/c/63711/2/lib/vdsm/jobs.py File lib/vdsm/jobs.py: Line 126: return self.status in (STATUS.PENDING, STATUS.RUNNING) Line 127: Line 128: def abort(self): Line 129: if not self.active: Line 130: raise JobNotActive() If _abort() failed in a previous attempt, we change the state to ABORTED, so this check will skip the next abort. I don't see a race free solution, and it will probably never happen, maybe document this issue here. Line 131: self._status = STATUS.ABORTED Line 132: logging.info('Job %r aborting...', self._id) Line 133: self._abort() Line 134: if self.autodelete: -- To view, visit https://gerrit.ovirt.org/63711 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia8bc1ab264c5786b43fb409c3fab8913337778bf Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: gerrit-hooks <[email protected]> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/admin/lists/[email protected]
