Change in vdsm[master]: Do not fail when getVSize is called on an inctive LV.

ykaplan at redhat.com ykaplan at redhat.com
Mon Dec 10 16:49:48 UTC 2012


Yeela Kaplan has posted comments on this change.

Change subject: Do not fail when getVSize is called on an inctive LV.
......................................................................


Patch Set 1: (1 inline comment)

....................................................
File vdsm/storage/blockVolume.py
Line 96:             if e.errno == os.errno.ENOENT:
Line 97:                 # Inactive volume has no /dev entry. Fallback to lvm way.
Line 98:                 size = int(int(lvm.getLV(sdobj.sdUUID, volUUID).size) / bs)
Line 99:             else:
Line 100:                 cls.log.warn("Could not get size for vol %s/%s",
Since we raise an exception, the right thing to do is to log exactly the reason why we couldn't get the volume size.
We could also do: 'raise e' if we know for sure that all flows that call egtVSuze() will print exc_info as Dan says, I'm just not sure that will actually happen cause we do have a problem with logging in many places.
There's a decision to be made here about what's the vdsm policy, and that would make everything easier.
Line 101:                                 sdobj.sdUUID, volUUID, exc_info=True)
Line 102:                 raise
Line 103: 
Line 104:         return size


--
To view, visit http://gerrit.ovirt.org/9739
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0a8b6da4d57cdf810769586c1959989d7a545d0c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Daniel Paikov <paikov at gmail.com>
Gerrit-Reviewer: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Haim Ateya <hateya at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>


More information about the vdsm-patches mailing list