Change in vdsm[master]: bootstrap: Return recovery error until hsm is ready

nsoffer at redhat.com nsoffer at redhat.com
Sun Jan 5 23:28:55 UTC 2014


Nir Soffer has posted comments on this change.

Change subject: bootstrap: Return recovery error until hsm is ready
......................................................................


Patch Set 5:

(2 comments)

....................................................
File vdsm/storage/dispatcher.py
Line 92: class Dispatcher:
Line 93:     log = logging.getLogger('Storage.Dispatcher')
Line 94: 
Line 95:     def __init__(self, obj):
Line 96:         self._obj = obj
obj.ready is a property, you cannot copy it with:

    self.ready = obj.ready

You will get False on when "copied", and will never become True.
Line 97:         self.storage_repository = config.get('irs', 'repository')
Line 98:         self._exposeFunctions(obj)
Line 99:         self.log.info("Starting StorageDispatcher...")
Line 100: 


Line 99:         self.log.info("Starting StorageDispatcher...")
Line 100: 
Line 101:     @property
Line 102:     def ready(self):
Line 103:         return getattr(self._obj, 'ready', True)
Note that the Dispatcher class is not HSMDispatcher but a generic class exposing @public method on any class. The ready property is a special non-generic part that we need for HSM. If we wrap another object with the dispatcher, and the other object does not care about "readiness", then it will always be ready.
Line 104: 
Line 105:     def _exposeFunctions(self, obj):
Line 106:         for funcName in dir(obj):
Line 107:             funcObj = getattr(obj, funcName)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id74468917c5b7c05d4183854e2f1255de98325dc
Gerrit-PatchSet: 5
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: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgotliv at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list