Change in vdsm[master]: task: add the support for abort_callback

nsoffer at redhat.com nsoffer at redhat.com
Wed Mar 18 21:34:54 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: task: add the support for abort_callback
......................................................................


Patch Set 5:

(2 comments)

https://gerrit.ovirt.org/#/c/33689/5//COMMIT_MSG
Commit Message:

Line 16: 
Line 17:     # abort_callback registers the callback for the time
Line 18:     # of execution of the code block
Line 19:     with vars.task.abort_callback(abort_long_operation):
Line 20: 	long_operation.execute()
Expand the tab
Line 21: 
Line 22: When another thread (e.g. an external xml-rpc request) tries
Line 23: to abort the task (calling "stop"), the registered callbacks
Line 24: will be called.


https://gerrit.ovirt.org/#/c/33689/5/vdsm/storage/task.py
File vdsm/storage/task.py:

Line 484:         self.state = State(State.init)
Line 485:         self.result = TaskResult(0, "Task is initializing", "")
Line 486: 
Line 487:         self.resOwner = resourceManager.Owner(proxy(self),
Line 488:                                               raiseonfailure=True)
Is this related?
Line 489:         self.error = se.TaskAborted("Unknown error encountered")
Line 490: 
Line 491:         self.mng = None
Line 492:         self._abort_lock = threading.Lock()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib82289e28e5ad9ea142850c31ccff3366b8397dc
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list