Xavi Francisco has uploaded a new change for review.
Change subject: storage: ignore missing pv metadata ......................................................................
storage: ignore missing pv metadata
Ignore missing metadata when trying to parse PV information from a problematic LVM device.
When vdsm tries to read metadata from a LVM physical volume and there's an error, the lvm command exits normally but no pv metadata is retrieved and a message is printed in stderr. When this happens the method getPV() in LVM returns None. This has to be checked whenever the PV metadata is needed to avoid throwing an exception.
Change-Id: I9932b044c8b439dc8b1f09191a5d89f4bc44c38a Bug-Url: https://bugzilla.redhat.com/1048696 Signed-off-by: Xavi Francisco xfrancis@redhat.com --- M vdsm/storage/blockSD.py 1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/42/27442/1
diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py index 377b132..c41e737 100644 --- a/vdsm/storage/blockSD.py +++ b/vdsm/storage/blockSD.py @@ -668,6 +668,10 @@ continue
pv = lvm.getPV(dev) + if not pv: + cls.log.warning("Could not get metadata from the device: %s", + dev) + continue pvInfo = {} pvInfo["guid"] = os.path.basename(pv.name) pvInfo["uuid"] = pv.uuid