2011/2/18 Eric Blake <eblake@xxxxxxxxxx>: > On 02/18/2011 02:30 AM, Matthias Bolte wrote: >> Etienne Gosset reported that libvirt fails to connect to his ESX >> server because it failed to parse its malformed host UUID, that >> contains a additional space and lacks one hexdigit in the last >> group: >> >> xxxxxxxx-xxxx-xxxx-xxxx- xxxxxxxxxxx > > Could this merely be a case of the host UUID printing with %12llx > instead of %012llx? ÂThat is, would it be worth teaching our parser that > if the initial parse fails, then try again by substituting leading > spaces as implicit 0s to see if that makes it valid? ÂOr is that > situation rare enough that the fallback parse is not worth the effort. Interesting idea, but I think %12llx vs %012llx is not the problem here, as I have an ESX server here that has a host UUID with leading zeros in the last group. The actual question I have left is who broke the UUID. Is it already malformed in the BIOS, or does the ESX server mess it up? I just found out that dmidecode is available in the service console so I can ask Etienne to lookup the UUID directly. >> >> Don't treat this as a fatal error, just ignore it. >> --- >> Âsrc/esx/esx_driver.c | Â Â9 +++++---- >> Â1 files changed, 5 insertions(+), 4 deletions(-) >> >> diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c >> index 97f3dbe..116ad0f 100644 >> --- a/src/esx/esx_driver.c >> +++ b/src/esx/esx_driver.c >> @@ -518,10 +518,11 @@ esxLookupHostSystemBiosUuid(esxPrivate *priv, unsigned char *uuid) >> >> Â Â Â Â Â Â Âif (strlen(dynamicProperty->val->string) > 0) { >> Â Â Â Â Â Â Â Â Âif (virUUIDParse(dynamicProperty->val->string, uuid) < 0) { >> - Â Â Â Â Â Â Â Â Â ÂESX_ERROR(VIR_ERR_INTERNAL_ERROR, >> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â_("Could not parse UUID from string '%s'"), >> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â ÂdynamicProperty->val->string); >> - Â Â Â Â Â Â Â Â Â Âgoto cleanup; >> + Â Â Â Â Â Â Â Â Â ÂVIR_WARN("Could not parse host UUID from string '%s'", >> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â dynamicProperty->val->string); >> + >> + Â Â Â Â Â Â Â Â Â Â/* HostSystem has an invalid UUID, ignore it */ >> + Â Â Â Â Â Â Â Â Â Âmemset(uuid, 0, VIR_UUID_BUFLEN); > > > At any rate, ACK to this patch, whether or not we try to teach uuid > parsing to be more tolerant of buggy UUIDs like this. > Thanks, pushed. Matthias -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list