Eduardo has uploaded a new change for review. Change subject: More precise exception when multipath failed. ......................................................................
More precise exception when multipath failed. In spite that any OSError is translated to ENODEV in devicemapper, the complete info is needed. Related to BZ#965184. Change-Id: I1b87e8e91b838db2c8a98c9afbbc998e8f4c792a Signed-off-by: Eduardo <[email protected]> --- M vdsm/storage/devicemapper.py 1 file changed, 4 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/45/17145/1 diff --git a/vdsm/storage/devicemapper.py b/vdsm/storage/devicemapper.py index 451c736..ff1fb7a 100644 --- a/vdsm/storage/devicemapper.py +++ b/vdsm/storage/devicemapper.py @@ -34,11 +34,10 @@ devlinkPath = DMPATH_FORMAT % deviceMultipathName try: devStat = os.stat(devlinkPath) - except OSError: - raise OSError(errno.ENODEV, "Could not find dm device named `%s`" % - deviceMultipathName) - - return "dm-%d" % os.minor(devStat.st_rdev) + except OSError as e: + raise OSError(errno.ENODEV, "%s: %s" % (deviceMultipathName, e)) + else: + return "dm-%d" % os.minor(devStat.st_rdev) def findDev(major, minor): -- To view, visit http://gerrit.ovirt.org/17145 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1b87e8e91b838db2c8a98c9afbbc998e8f4c792a Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
