Change in vdsm[master]: [WIP] Add a releaseHostId option to stop the DomainMonitorTh...

nsoffer at redhat.com nsoffer at redhat.com
Tue Dec 24 15:28:17 UTC 2013


Nir Soffer has posted comments on this change.

Change subject: [WIP] Add a releaseHostId option to stop the DomainMonitorThread
......................................................................


Patch Set 1:

(3 comments)

Looks ok after fixing stop parameters - but not clear why we need this. What was wrong by always releasing the host id?

....................................................
Commit Message
Line 3: AuthorDate: 2012-08-29 10:28:42 -0400
Line 4: Commit:     Federico Simoncelli <fsimonce at redhat.com>
Line 5: CommitDate: 2012-08-29 10:32:45 -0400
Line 6: 
Line 7: [WIP] Add a releaseHostId option to stop the DomainMonitorThread
Why?
Line 8: 
Line 9: Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=851151
Line 10: Change-Id: I83458fb4146de7e402606916615533da305bd867


....................................................
File vdsm/storage/domainMonitor.py
Line 129: 
Line 130:     def start(self):
Line 131:         self.thread.start()
Line 132: 
Line 133:     def stop(self, wait=True, releaseHostId):
Should be:

    def stop(self, wait=True, releaseHostId=RELEASE_HOSTID_DEFAULT):
        ...
Line 134:         self.releaseHostId = releaseHostId
Line 135: 
Line 136:         self.stopEvent.set()
Line 137:         if wait:


Line 165:                                "%s", self.hostId, self.sdUUID, exc_info=True)
Line 166: 
Line 167:         # Resetting the releaseHostId value to its default just to be sure in
Line 168:         # case in the future we want to recycle the DomainMonitor objects.
Line 169:         self.releaseHostId = self.RELEASE_HOSTID_DEFAULT
Should use try-finally:

try:
    loop...
finally:
    self.releaseHostId = self.RELEASE_HOSTID_DEFAULT
Line 170: 
Line 171:     def _monitorDomain(self):
Line 172:         self.nextStatus.clear()
Line 173: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I83458fb4146de7e402606916615533da305bd867
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list