Change in vdsm[master]: StorageDomainManifest: move getLeasesFilePath

alitke at redhat.com alitke at redhat.com
Wed Jun 10 18:55:52 UTC 2015


Adam Litke has posted comments on this change.

Change subject: StorageDomainManifest: move getLeasesFilePath
......................................................................


Patch Set 2:

(4 comments)

https://gerrit.ovirt.org/#/c/41995/2/vdsm/storage/blockSD.py
File vdsm/storage/blockSD.py:

Line 423: 
Line 424:         return int(size)
Line 425: 
Line 426:     def getLeasesFilePath(self):
Line 427:         lvm.activateLVs(self.sdUUID, [sd.LEASES])
> Activating lvs as a side offfect of getting the path is very wrong. Please 
Done
Line 428:         return lvm.lvPath(self.sdUUID, sd.LEASES)
Line 429: 
Line 430: 
Line 431: class BlockStorageDomain(sd.StorageDomain):


https://gerrit.ovirt.org/#/c/41995/2/vdsm/storage/sd.py
File vdsm/storage/sd.py:

Line 290
Line 291
Line 292
Line 293
Line 294
> I'm not sure we need this super class, better if we can eliminate it.
There are plenty of methods common to both types that will need to be here.  I don't think we can remove it.  The biggest example are metadata getters/setters (ie. getDescription / getInfo) which rely on the low-level metadata operations implemented in the child Manifest classes.


Line 305: 
Line 306:     def replaceMetadata(self, md):
Line 307:         self._metadata = md
Line 308: 
Line 309:     def getLeasesFilePath(self):
> This is also can be in FileStorageDomainManifest
Done
Line 310:         return os.path.join(self.getMDPath(), LEASES)
Line 311: 
Line 312:     def getMDPath(self):
Line 313:         if self.domaindir:


Line 308: 
Line 309:     def getLeasesFilePath(self):
Line 310:         return os.path.join(self.getMDPath(), LEASES)
Line 311: 
Line 312:     def getMDPath(self):
> This looks like file storage domain method that sneaked into StorageDomain.
Unfortunately it's an interface of StorageDomain that is being used in sp.py so we cannot remove it.
Line 313:         if self.domaindir:
Line 314:             return os.path.join(self.domaindir, DOMAIN_META_DATA)
Line 315:         return None
Line 316: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2bb49591357e0ae77268789da78e8504864a8057
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list