Eric Blake
2022-May-10 13:52 UTC
[Libguestfs] [PATCH nbdkit] vddk: Demote another useless phone-home error message to debug
On Tue, May 10, 2022 at 01:48:44PM +0100, Richard W.M. Jones wrote:> Earlier commit df7957c8b8 ("vddk: Demote useless VMware error message > to a debug statement.") turned an error message from VMware's phone > home anti-feature into a debug message. It turns out there is more > than one of these messages. > > Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2083617 > Reported-by: Ming Xie > --- > plugins/vddk/vddk.c | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-)Reviewed-by: Eric Blake <eblake at redhat.com>> > diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c > index 51ef8f33..2ea071d6 100644 > --- a/plugins/vddk/vddk.c > +++ b/plugins/vddk/vddk.c > @@ -513,11 +513,15 @@ error_function (const char *fs, va_list args) > > trim (str); > > - /* VDDK 7 added a useless error message about their "phone home" > - * system called CEIP which only panics users. Demote it to a debug > - * statement. https://bugzilla.redhat.com/show_bug.cgi?id=1834267 > + /* VDDK 7 added some useless error messages about their "phone home" > + * system called CEIP which only panics users. Demote to a debug > + * statement. > + * https://bugzilla.redhat.com/show_bug.cgi?id=1834267 > + * https://bugzilla.redhat.com/show_bug.cgi?id=2083617 > */ > - if (strstr (str, "Get CEIP status failed") != NULL) { > + if (strstr (str, "Get CEIP status failed") != NULL || > + strstr (str, "VDDK_PhoneHome: Unable to load configuration " > + "options from ") != NULL) {Could there ever be locale issues where this message from VDDK might be translated and thus not trigger our simple strstr() check? Or are we careful in nbdkit to force a known locale onto vddk, even if it is different than the user's default locale? -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Richard W.M. Jones
2022-May-10 13:58 UTC
[Libguestfs] [PATCH nbdkit] vddk: Demote another useless phone-home error message to debug
On Tue, May 10, 2022 at 08:52:23AM -0500, Eric Blake wrote:> > - if (strstr (str, "Get CEIP status failed") != NULL) { > > + if (strstr (str, "Get CEIP status failed") != NULL || > > + strstr (str, "VDDK_PhoneHome: Unable to load configuration " > > + "options from ") != NULL) { > > Could there ever be locale issues where this message from VDDK might > be translated and thus not trigger our simple strstr() check? Or are > we careful in nbdkit to force a known locale onto vddk, even if it is > different than the user's default locale?The message comes from VDDK (library side) and this library doesn't appear to do any kind of translation at all. So although we don't force a known locale, either in nbdkit nor when running nbdkit from virt-v2v, I don't think this string could change. It's only a cosmetic thing: if the string changes in future all that happens is it gets sent through nbdkit_error instead of nbdkit_debug, but conversion continues regardless. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
Richard W.M. Jones
2022-May-10 13:59 UTC
[Libguestfs] [PATCH nbdkit] vddk: Demote another useless phone-home error message to debug
I pushed this as commit 270ee75ede3881f32a7c21264676851dcf0969be. I was finally able to test the change myself. It requires a very specific set of circumstances detailed in the BZ. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org