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