Change in vdsm[master]: BZ#836161 - Refactored deleteImage.
abaron at redhat.com
abaron at redhat.com
Mon Oct 15 10:42:56 UTC 2012
Ayal Baron has posted comments on this change.
Change subject: BZ#836161 - Refactored deleteImage.
......................................................................
Patch Set 1: (4 inline comments)
....................................................
File vdsm/storage/blockSD.py
Line 216: except se.StorageException as e:
Line 217: log.debug("SD %s, Image %s pre zeroing ops failed", sdUUID, imgUUID,
Line 218: volUUIDs)
Line 219: try:
Line 220: lvm.changelv(sdUUID, volUUIDs, ("--permission", "rw"))
please open an lvm bug on this. refresh the one you have if it's relevant.
Line 221: except se.StorageException as e:
Line 222: # Hope this only means that some volumes were already writable.
Line 223: log.debug("IGNORED: %s", e)
Line 224: # blank the volumes.
Line 219: try:
Line 220: lvm.changelv(sdUUID, volUUIDs, ("--permission", "rw"))
Line 221: except se.StorageException as e:
Line 222: # Hope this only means that some volumes were already writable.
Line 223: log.debug("IGNORED: %s", e)
this log line is really bad.
Line 224: # blank the volumes.
Line 225: zeroPs = {}
Line 226: for volUUID in volUUIDs:
Line 227: zeroPs[volUUID] = _zeroVolume(sdUUID, volUUID)
Line 228:
Line 229: # Yes, this is a potentially infinite loop. Kill the vdsm task.
Line 230: last = time.time()
Line 231: while len(zeroPs) > 0:
Line 232: time.sleep(ZERO_SLEEP)
why sleep?
poll?
Line 233: toDelete = []
Line 234: for volUUID, rc in _getZerosFinished(zeroPs):
Line 235: if rc != 0:
Line 236: log.warning("zero leftover: %s/%s rc = %s", sdUUID, volUUID, rc)
....................................................
File vdsm/storage/hsm.py
Line 1278: if misc.parseBool(postZero):
Line 1279: self._spmSchedule(spUUID, "zeroImage_%s" % imgUUID, dom.zeroImage,
Line 1280: sdUUID, imgUUID, imgsByVol.keys())
Line 1281: else:
Line 1282: dom.deleteImage(sdUUID, imgUUID, imgsByVol)
s/deleteImage/deleveVolumes/
Line 1283: # This is a hack to keep the interface consistent
Line 1284: # We currently have race conditions in delete image, to quickly fix
Line 1285: # this we delete images in the "synchronous" state. This only works
Line 1286: # because rhev-m does not send two requests at a time. This hack is
--
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: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
More information about the vdsm-patches
mailing list