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

smizrahi at redhat.com smizrahi at redhat.com
Sun Jun 8 14:33:53 UTC 2014


Saggi Mizrahi has posted comments on this change.

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


Patch Set 4: Code-Review-1

This update is actually wrong.
You can't call resource.grant() before incrementing the activeUsers count.

grant() sets the _doneEvent() which might prompt another thread to act as if the resource is owned when an error is hit.

It's impossible to do anything assuming the standard library can throw errors at any time as it causes to many unpredictable behaviors.

The solution, sadly, is to trap the error in a wrapper to the logging or manually wrap every log call in try\except.

-- 
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: No


More information about the vdsm-patches mailing list