From 23c1a34ecd6ca7f986ffff7a04deeb3eab0948c9 Mon Sep 17 00:00:00 2001 From: Jeffrey Cody Date: Mon, 11 Dec 2017 22:38:12 +0100 Subject: [PATCH 2/6] block/vxhs: improve error message for missing / bad vxhs module RH-Author: Jeffrey Cody Message-id: <59af10d83125fff42beacd30dbca83d50409bbed.1513031708.git.jcody@redhat.com> Patchwork-id: 78305 O-Subject: [RHV7.5 qemu-kvm-rhev PATCH 1/1] block/vxhs: improve error message for missing / bad vxhs module Bugzilla: 1505654 RH-Acked-by: Markus Armbruster RH-Acked-by: Dr. David Alan Gilbert RH-Acked-by: Stefan Hajnoczi RH-Acked-by: Laszlo Ersek [Downstream only, as the module load of libvxhs is downstream only] In the case of missing libvxhs libraries, the original error message, while technically accurate, may lead a user to think there is a QEMU bug if trying to using the VXHS protocol. Update the message so that it is clear that the likely issue is that the Veritas QEMU libvxhs RPM is not installed (or not installed correctly, if there are permission or file corruption issues, etc.). An example error message before this change: > qemu-img info vxhs://localhost/test qemu-img: Could not open 'vxhs://localhost/test': \ error loading libvxhs: /usr/lib64/qemu/libvxhs.so.1: \ cannot open shared object file: No such file or directory An example error message after this change: > qemu-img info vxhs://localhost/test qemu-img: Could not open 'vxhs://localhost/test': \ The VXHS library from Veritas might not be installed correctly \ (/usr/lib64/qemu/libvxhs.so.1: \ cannot open shared object file: No such file or directory) Signed-off-by: Jeff Cody Signed-off-by: Miroslav Rezanina --- block/vxhs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/vxhs.c b/block/vxhs.c index a18154c..68edb51 100644 --- a/block/vxhs.c +++ b/block/vxhs.c @@ -115,7 +115,8 @@ static void bdrv_vxhs_load_libs(Error **errp) libvxhs_handle = g_module_open(LIBVXHS_FULL_PATHNAME, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL); if (!libvxhs_handle) { - error_setg(errp, "error loading libvxhs: %s", g_module_error()); + error_setg(errp, "The VXHS library from Veritas might not be installed " + "correctly (%s)", g_module_error()); return; } -- 1.8.3.1