Dan Kenigsberg has posted comments on this change.

Change subject: BZ#836161 - Rewrite of deleteImage().
......................................................................


Patch Set 8: (5 inline comments)

....................................................
File vdsm/storage/blockSD.py
Line 221:     zerofds = {}
Line 222:     poller = select.poll()
Line 223:     for volUUID in volUUIDs:
Line 224:         proc = _zeroVolume(sdUUID, volUUID)
Line 225:         fd = proc.stdout.fileno()
I see in http://docs.python.org/2/library/select.html#select.poll.register that 
file objects are valid, too, as args, but I'm not sure of the importance of 
this here.
Line 226:         zerofds[fd] = ProcVol(proc, volUUID)
Line 227:         poller.register(fd, select.EPOLLHUP)
Line 228: 
Line 229:     # Wait until all the asyncs procs return


Line 236:             if not proc.wait(0):
Line 237:                 continue
Line 238:             else:
Line 239:                 poller.unregister(fd)
Line 240:                 zerofds.pop(fd)
Saggi, we needs to clear up zerofds here, or else we get into an infinite loop.
Line 241:                 if proc.returncode != 0:
Line 242:                     log.error("zeroing %s/%s failed. Zero and remove 
this "
Line 243:                                 "volume manually. rc=%s %s",
Line 244:                                 sdUUID, vol, proc.rc, proc.stderr)


Line 253:                 # TODO: Add the list of removed fail volumes to the 
exception.
Line 254:                 log.error("Remove failed for zeroed volumes: %s", e)
Line 255: 
Line 256: 
Line 257:     log.debug("VG:%s LVs: %s, img: %s", sdUUID, volUUIDs, imgUUID)
toDelete is reset on every while-loop iteration, and thus quite meaningless 
here.
Line 258:     return
Line 259: 
Line 260: 
Line 261: class VGTagMetadataRW(object):


....................................................
File vdsm/storage/hsm.py
Line 1268:         allVols = dom.getAllVolumes()
Line 1269:         volsByImg = sd.getVolsOfImage(allVols, imgUUID)
Line 1270:         # Do not validate if forced.
Line 1271:         if not misc.parseBool(force) and not dom.isBackup() \
Line 1272:                 and not all(len(v.imgs) == 1 for v in 
volsByImg.itervalues()):
comment added instead.
Line 1273:                 msg = "Cannot delete shared image %s. volImgs: %s" \
Line 1274:                                             % (imgUUID, volsByImg)
Line 1275:                 raise se.CannotDeleteSharedVolume(msg)
Line 1276: 


....................................................
File vdsm/storage/sd.py
Line 140: LEASE_BLOCKS = 2048
Line 141: 
Line 142: UNICODE_MINIMAL_VERSION = 3
Line 143: 
Line 144: storage_repository = config.get('irs', 'repository')
actually, this nasty config.get('irs', 'repository') is performed in this 
module's import already.
Line 145: mountBasePath = os.path.join(storage_repository, DOMAIN_MNT_POINT)
Line 146: 
Line 147: 
Line 148: def getVolsOfImage(allVols, imgUUID):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I304ff5cd70186ffc9789cd1ac9337efa6c5ff695
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Eduardo <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Haim Ateya <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: ShaoHe Feng <[email protected]>
Gerrit-Reviewer: Shu Ming <[email protected]>
Gerrit-Reviewer: Yeela Kaplan <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to