From 94a3b6b63449ac4a16c76c1d5c52d58f5c895ecc Mon Sep 17 00:00:00 2001 From: Lee Yarwood Date: Tue, 22 Jan 2013 14:09:28 +0000 Subject: [PATCH 23/27] upgrade: catch MetaDataKeyNotFoundError when preparing images Ensure that we catch and continue past any MetaDataKeyNotFoundError exception when preparing images that may contain partially removed volumes. For example where the LV is still present but the metadata block has been blanked out. Change-Id: I92f7a61bf6d1e24e84711486fd4f8ba67e2a0077 Signed-off-by: Lee Yarwood Reviewed-on: http://gerrit.ovirt.org/11485 Reviewed-by: Federico Simoncelli --- vdsm/storage/imageRepository/formatConverter.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vdsm/storage/imageRepository/formatConverter.py b/vdsm/storage/imageRepository/formatConverter.py index 95a77d1..cbf64f5 100644 --- a/vdsm/storage/imageRepository/formatConverter.py +++ b/vdsm/storage/imageRepository/formatConverter.py @@ -280,6 +280,11 @@ def v3DomainConverter(repoPath, hostId, domain, isMsd): log.error("It is not possible to prepare the image %s, the " "volume chain looks damaged", imgUUID, exc_info=True) + except se.MetaDataKeyNotFoundError: + log.error("It is not possible to prepare the image %s, the " + "volume metadata looks damaged", imgUUID, + exc_info=True) + finally: try: img.teardown(domain.sdUUID, imgUUID) -- 1.8.1