In commit 58125210ab ("Tools: hv: cache FQDN in kvp_daemon to avoid timeouts") 
I changed the code to lookup the hostname just once during start. While this 
works most of the time, there is still a slim chance that name resolution does 
not work properly at that time. As a result the host will always get an error 
string instead of the current hostname, like "getaddrinfo failed: 0xfffffffe 
Name or service not known".

I wonder how much effort kvp_daemon should do to provide the hostname. Does the 
host make any use of that string, other than eventually show it to an admin? In 
my case it was shown that way in the "Windows Admin Center dashboard".

Possible solutions are:
- link kvp_daemon to pthread and run a separate thread to resolve the hostname 
just once, or periodically.
- spawn a separate resolver process, do not wait for it and process the result 
if anything is provided by that helper.
- just leave the code as is and deal with incorrect data. Not sure if the host 
would actually notice a change in the hostname string.

Olaf

Attachment: pgpUkwaeJg_lN.pgp
Description: Digitale Signatur von OpenPGP

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to