Change in vdsm[master]: XXX: All outstanding VolumeMetadata changes squashed
Adam Litke has abandoned this change. Change subject: XXX: All outstanding VolumeMetadata changes squashed .. Abandoned -- To view, visit https://gerrit.ovirt.org/50362 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I5db8bb8bdf405b8760ecbe103dcbb1a1907ca1db Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: XXX: All outstanding VolumeMetadata changes squashed
gerrit-hooks has posted comments on this change. Change subject: XXX: All outstanding VolumeMetadata changes squashed .. Patch Set 7: * Update tracker: IGNORE, no Bug-Url found -- To view, visit https://gerrit.ovirt.org/50362 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5db8bb8bdf405b8760ecbe103dcbb1a1907ca1db Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: XXX: All outstanding VolumeMetadata changes squashed
gerrit-hooks has posted comments on this change. Change subject: XXX: All outstanding VolumeMetadata changes squashed .. Patch Set 7: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/50362 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5db8bb8bdf405b8760ecbe103dcbb1a1907ca1db Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: XXX: All outstanding VolumeMetadata changes squashed
gerrit-hooks has posted comments on this change. Change subject: XXX: All outstanding VolumeMetadata changes squashed .. Patch Set 6: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/50362 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5db8bb8bdf405b8760ecbe103dcbb1a1907ca1db Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: XXX: All outstanding VolumeMetadata changes squashed
gerrit-hooks has posted comments on this change. Change subject: XXX: All outstanding VolumeMetadata changes squashed .. Patch Set 5: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/50362 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5db8bb8bdf405b8760ecbe103dcbb1a1907ca1db Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: XXX: All outstanding VolumeMetadata changes squashed
gerrit-hooks has posted comments on this change. Change subject: XXX: All outstanding VolumeMetadata changes squashed .. Patch Set 3: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/50362 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5db8bb8bdf405b8760ecbe103dcbb1a1907ca1db Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: XXX: All outstanding VolumeMetadata changes squashed
gerrit-hooks has posted comments on this change. Change subject: XXX: All outstanding VolumeMetadata changes squashed .. Patch Set 4: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/50362 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5db8bb8bdf405b8760ecbe103dcbb1a1907ca1db Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: XXX: All outstanding VolumeMetadata changes squashed
gerrit-hooks has posted comments on this change. Change subject: XXX: All outstanding VolumeMetadata changes squashed .. Patch Set 2: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/50362 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5db8bb8bdf405b8760ecbe103dcbb1a1907ca1db Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: XXX: All outstanding VolumeMetadata changes squashed
Adam Litke has posted comments on this change. Change subject: XXX: All outstanding VolumeMetadata changes squashed .. Patch Set 1: Code-Review-2 -- To view, visit https://gerrit.ovirt.org/50362 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5db8bb8bdf405b8760ecbe103dcbb1a1907ca1db Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: Adam Litke Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: XXX: All outstanding VolumeMetadata changes squashed
Adam Litke has uploaded a new change for review. Change subject: XXX: All outstanding VolumeMetadata changes squashed .. XXX: All outstanding VolumeMetadata changes squashed Change-Id: I5db8bb8bdf405b8760ecbe103dcbb1a1907ca1db Signed-off-by: Adam Litke--- M vdsm/storage/blockVolume.py M vdsm/storage/fileVolume.py M vdsm/storage/volume.py 3 files changed, 338 insertions(+), 270 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/62/50362/1 diff --git a/vdsm/storage/blockVolume.py b/vdsm/storage/blockVolume.py index cab02e2..a8de56a 100644 --- a/vdsm/storage/blockVolume.py +++ b/vdsm/storage/blockVolume.py @@ -30,6 +30,7 @@ import volume import image import sd +import blockSD import misc from misc import logskip from misc import deprecated @@ -196,6 +197,18 @@ """ return lvm.lvPath(self.sdUUID, self.volUUID) +def getVolumeSize(self, bs=BLOCK_SIZE): +""" +Return the volume size in blocks +""" +# Just call the SD Manifest method getVSize() - apparently it does what +# we need. We consider incurred overhead of producing the object +# to be a small price for code de-duplication. +manifest = sdCache.produce(self.sdUUID).manifest +return int(manifest.getVSize(self.imgUUID, self.volUUID) / bs) + +getVolumeTrueSize = getVolumeSize + def setMetadata(self, meta, metaId=None): """ Set the meta data hash as the new meta data of the Volume @@ -270,6 +283,50 @@ # tags self.setMetaParam(volume.IMAGE, imgUUID) +def removeMetadata(self, metaId): +""" +Just wipe meta. +""" +try: +self._putMetadata(metaId, {"NONE": "#" * (sd.METASIZE - 10)}) +except Exception as e: +self.log.error(e, exc_info=True) +raise se.VolumeMetadataWriteError("%s: %s" % (metaId, e)) + +@classmethod +def newVolumeLease(cls, metaId, sdUUID, volUUID): +cls.log.debug("Initializing volume lease volUUID=%s sdUUID=%s, " + "metaId=%s", volUUID, sdUUID, metaId) +manifest = blockSD.BlockStorageDomainManifest(sdUUID) +metaSdUUID, mdSlot = metaId + +leasePath = manifest.getLeasesFilePath() +leaseOffset = ((mdSlot + RESERVED_LEASES) + * manifest.logBlkSize * sd.LEASE_BLOCKS) + +sanlock.init_resource(sdUUID, volUUID, [(leasePath, leaseOffset)]) + +def refreshVolume(self): +lvm.refreshLVs(self.sdUUID, (self.volUUID,)) + +def _share(self, dstImgPath): +""" +Share this volume to dstImgPath +""" +dstPath = os.path.join(dstImgPath, self.volUUID) + +self.log.debug("Share volume %s to %s", self.volUUID, dstImgPath) +os.symlink(self._md.getDevPath(), dstPath) + +@classmethod +def getImageVolumes(cls, repoPath, sdUUID, imgUUID): +""" +Fetch the list of the Volumes UUIDs, not including the shared base +(template) +""" +lvs = lvm.lvsByTag(sdUUID, "%s%s" % (TAG_PREFIX_IMAGE, imgUUID)) +return [lv.name for lv in lvs] + class BlockVolume(volume.Volume): """ Actually represents a single volume (i.e. part of virtual disk). @@ -287,7 +344,7 @@ return self._md.metaoff def refreshVolume(self): -lvm.refreshLVs(self.sdUUID, (self.volUUID,)) +self._md.refreshVolume() @classmethod def halfbakedVolumeRollback(cls, taskObj, sdUUID, volUUID, volPath): @@ -434,7 +491,7 @@ self.recheckIfLeaf() if not force: -self.validateDelete() +self._md.validateDelete() # Mark volume as illegal before deleting self.setLegality(volume.ILLEGAL_VOL) @@ -577,15 +634,6 @@ def getDevPath(self): return self._md.getDevPath() -def _share(self, dstImgPath): -""" -Share this volume to dstImgPath -""" -dstPath = os.path.join(dstImgPath, self.volUUID) - -self.log.debug("Share volume %s to %s", self.volUUID, dstImgPath) -os.symlink(self._md.getDevPath(), dstPath) - @classmethod def shareVolumeRollback(cls, taskObj, volPath): cls.log.info("Volume rollback for volPath=%s", volPath) @@ -654,54 +702,10 @@ @classmethod def getImageVolumes(cls, repoPath, sdUUID, imgUUID): -""" -Fetch the list of the Volumes UUIDs, not including the shared base -(template) -""" -lvs = lvm.lvsByTag(sdUUID, "%s%s" % (TAG_PREFIX_IMAGE, imgUUID)) -return [lv.name for lv in lvs] - -def removeMetadata(self, metaId): -""" -Just wipe meta. -""" -try: -self._putMetadata(metaId, {"NONE": "#" * (sd.METASIZE - 10)}) -except Exception as e: -self.log.error(e, exc_info=True) -
Change in vdsm[master]: XXX: All outstanding VolumeMetadata changes squashed
gerrit-hooks has posted comments on this change. Change subject: XXX: All outstanding VolumeMetadata changes squashed .. Patch Set 1: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3']) -- To view, visit https://gerrit.ovirt.org/50362 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5db8bb8bdf405b8760ecbe103dcbb1a1907ca1db Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam LitkeGerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches