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(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Daniel P. Berrange <berrange(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: Liron Ar <laravot(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Yoav Kleinberger <ykleinbe(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes