Adam Litke has uploaded a new change for review. Change subject: storage: Filter incomplete volumes from volume queries ......................................................................
storage: Filter incomplete volumes from volume queries LVs that are labeled with TEMP_VOL_LVTAG represent incomplete volumes and should not appear when querying storage for volume and image information. Filter them in _getVolsTree(). Later when the garbage collector needs to find these volumes we can add a flag to invert the filter. Change-Id: I92acef22de8b1faaed0754fbddedfc2273095c3b Signed-off-by: Adam Litke <[email protected]> --- M vdsm/storage/blockSD.py 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/86/56086/1 diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py index e2d413a..2c73cc8 100644 --- a/vdsm/storage/blockSD.py +++ b/vdsm/storage/blockSD.py @@ -36,6 +36,7 @@ from vdsm import constants from vdsm import exception from vdsm import utils +from vdsm.storage import constants as storage_constants from vdsm.storage import exception as se from vdsm.storage import mount from vdsm.storage.persistent import PersistentDict, DictValidator @@ -157,11 +158,12 @@ image = tag[len(blockVolume.TAG_PREFIX_IMAGE):] elif tag.startswith(blockVolume.TAG_PREFIX_PARENT): parent = tag[len(blockVolume.TAG_PREFIX_PARENT):] + elif tag == storage_constants.TEMP_VOL_LVTAG: + break # Don't report volumes marked for garbage collection + else: if parent and image: vols[lv.name] = BlockSDVol(lv.name, image, parent) - break - else: - if lv.name not in SPECIAL_LVS: + elif lv.name not in SPECIAL_LVS: log.warning("Ignoring Volume %s that lacks minimal tag set" "tags %s" % (lv.name, lv.tags)) return vols -- To view, visit https://gerrit.ovirt.org/56086 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I92acef22de8b1faaed0754fbddedfc2273095c3b Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
