Nir Soffer has posted comments on this change.

Change subject: sp: Allow attaching of monitored domain
......................................................................


Patch Set 3:

(3 comments)

https://gerrit.ovirt.org/#/c/48217/3/vdsm/storage/monitor.py
File vdsm/storage/monitor.py:

Line 98:     def startMonitoring(self, sdUUID, hostId, poolDomain=True):
Line 99:         monitor = self._monitors.get(sdUUID)
Line 100: 
Line 101:         if monitor is not None:
Line 102:             if poolDomain:
> I think it'll be nicer to have this code clearer on the fact that lines 102
monitor.poolDomain is checked bellow, not clear what do you suggest.
Line 103:                 # Called from the StoragePool.attachSD() when 
attaching an
Line 104:                 # external storage domain to the pool. Expected 
during Vdsm
Line 105:                 # startup when using hosted engine. From this point, 
the
Line 106:                 # storage domain is managed by vdsm.


Line 99:         monitor = self._monitors.get(sdUUID)
Line 100: 
Line 101:         if monitor is not None:
Line 102:             if poolDomain:
Line 103:                 # Called from the StoragePool.attachSD() when 
attaching an
> I'll add to the beginning of the sentence something like "We'll get here wh
Will replace the method name with the name of the flow.
Line 104:                 # external storage domain to the pool. Expected 
during Vdsm
Line 105:                 # startup when using hosted engine. From this point, 
the
Line 106:                 # storage domain is managed by vdsm.
Line 107:                 if not monitor.poolDomain:


Line 103:                 # Called from the StoragePool.attachSD() when 
attaching an
Line 104:                 # external storage domain to the pool. Expected 
during Vdsm
Line 105:                 # startup when using hosted engine. From this point, 
the
Line 106:                 # storage domain is managed by vdsm.
Line 107:                 if not monitor.poolDomain:
> you can change that to a positive if
Do you mean check first for the unexpected condition? Good idea.
Line 108:                     self.log.info("Attaching monitor for %s to the 
pool",
Line 109:                                   sdUUID)
Line 110:                     monitor.poolDomain = True
Line 111:                 else:


-- 
To view, visit https://gerrit.ovirt.org/48217
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia2fc1b19a6e70d4001a8f6d8c14bae7f65d0c192
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Ala Hino <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Freddy Rolland <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to