Change in vdsm[master]: resourceManager: Keep resource state if registerResource fails

nsoffer at redhat.com nsoffer at redhat.com
Sun Jun 8 14:16:48 UTC 2014


Nir Soffer has posted comments on this change.

Change subject: resourceManager: Keep resource state if registerResource fails
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.ovirt.org/#/c/25284/4/vdsm/storage/resourceManager.py
File vdsm/storage/resourceManager.py:

Line 599:                 resource.activeUsers += 1
Line 600: 
Line 601:                 self._log.debug("Resource '%s' is free. Now locking as '%s' "
Line 602:                                 "(1 active user)", fullName, request.lockType)
Line 603:                 request.grant()
> Does this mean that if something breaks we have a granted request for a res
request.grant(), does *not* grant the resource to the caller, so we don't have an issue failing after request.grant() was called.

What can be an issue, is the request.emit call, invoking the user callback. This happens when exiting from this context, and should not happen something was raised in this context - but I'm not sure this is the case - this code is way too complex to reason about.
Line 604:                 ref = RequestRef(request)
Line 605:                 contextCleanup.defer(request.emit,
Line 606:                                      ResourceRef(namespace, name,
Line 607:                                                  resource.realObj,


-- 
To view, visit http://gerrit.ovirt.org/25284
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I16abf41ebc8a8a99b292d38c945074752254a34b
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Daniel P. Berrange <berrange at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim at redhat.com>
Gerrit-Reviewer: Liron Ar <laravot at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Yoav Kleinberger <ykleinbe 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