Change in vdsm[master]: domain: fix onDomainConnectivityStateChange attribute

smizrahi at redhat.com smizrahi at redhat.com
Mon Oct 15 13:43:47 UTC 2012


Saggi Mizrahi has posted comments on this change.

Change subject: domain: fix onDomainConnectivityStateChange attribute
......................................................................


Patch Set 7: I would prefer that you didn't submit this

(1 inline comment)

....................................................
File vdsm/storage/domainMonitor.py
Line 215:             self.log.debug("Domain %s changed its status to %s", self.sdUUID,
Line 216:                            "Valid" if self.nextStatus.valid else "Invalid")
Line 217: 
Line 218:             try:
Line 219:                 self.domainMonitor().onDomainConnectivityStateChange \
Cutting of a line in the middle of an invocation chain is really confusing.

ev = self.domainMonitor().onDomainConnectivityStateChange
ev.emit(....

Also, self.domainMonitor() returning None should be tested not as an exception (AttributeError).

If for some reason it should happen I want to log to state that it's a weird state. QA grep for AttributeError in our logs. Don't give them ammunition.

I know it shouldn't happen, but still, just to be sure.
Line 220:                                     .emit(self.sdUUID, self.nextStatus.valid)
Line 221:             except:
Line 222:                 self.log.warn("Could not emit domain state change event",
Line 223:                               exc_info=True)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If3b7e7c788b54726a3c820f4f2180884c74d93ef
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Ryan Harper <ryanh at us.ibm.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>


More information about the vdsm-patches mailing list