Dima Kuznetsov has uploaded a new change for review. Change subject: caps: Fix access to /sys/class/iommu ......................................................................
caps: Fix access to /sys/class/iommu This patch fixes OSError during getVdsCapabilities introduced in https://gerrit.ovirt.org/#/c/37701/ On some systems, iommu is not present, causing getVdsCapabilities to not return properly. Change-Id: Ie11f10163984a8bb4cf2e27225d2e19d6cb2f9ae Signed-off-by: Dima Kuznetsov <[email protected]> --- M vdsm/caps.py 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/41/38641/1 diff --git a/vdsm/caps.py b/vdsm/caps.py index 87c52ba..58f3075 100644 --- a/vdsm/caps.py +++ b/vdsm/caps.py @@ -597,7 +597,10 @@ def _getHostdevPassthorughSupport(): - return bool(len(os.listdir('/sys/class/iommu'))) + try: + return bool(len(os.listdir('/sys/class/iommu'))) + except OSError: + return False def get(): -- To view, visit https://gerrit.ovirt.org/38641 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie11f10163984a8bb4cf2e27225d2e19d6cb2f9ae Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dima Kuznetsov <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
