Change in vdsm[master]: New getChildrenList implementation.

ewarszaw at redhat.com ewarszaw at redhat.com
Tue Oct 8 16:55:27 UTC 2013


Eduardo has posted comments on this change.

Change subject: New getChildrenList implementation.
......................................................................


Patch Set 6:

(2 comments)

....................................................
File vdsm/storage/fileVolume.py
Line 378:         domPath = self.imagePath.split('images')[0]
Line 379:         gPath = os.path.join(domPath, 'images', '*', '*.meta')
Line 380:         metaPaths = oop.getProcessPool(self.sdUUID).glob.glob(gPath)
Line 381:         pattern = "%s.*%s" % (volume.PUUID, self.volUUID)
Line 382:         matches = grepCmd(pattern, metaPaths)
>From the vdsm point of view, using grep is a unique operation, making the error logic here much more simpler.
Reading each file and regex'ing requires to catch filing for  a particular file.

In addition, re module is not imported but utils is.
Line 383:         if matches:
Line 384:             children = []
Line 385:             for line in matches:
Line 386:                 volMeta = os.path.basename(line.split(':')[0])


....................................................
File vdsm/storage/volume.py
Line 532:             # previous volume deletion failure).
Line 533:             # So, there is no reasons to avoid its deletion
Line 534:             self.log.warn("Volume %s metadata error (%s)",
Line 535:                           self.volUUID, str(e))
Line 536:         if self.getChildren():
Yes. Corrupted MD may not include the shared key.
Line 537:             raise se.VolumeImageHasChildren(self)
Line 538: 
Line 539:     def extend(self, newsize):
Line 540:         """


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I584cd5d1b03d3965457f12c3d67de95455d1de24
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw 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: Elad Ben Aharon <eladba1990 at gmail.com>
Gerrit-Reviewer: Gadi Ickowicz <gickowic at redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgotliv at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei 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