Bug #34462
closedShorten DNS timeout for primary NIC detection
Description
In facts parsing code we have a very old code bit that performs DNS reverse query for each IP address until it finds a PTR record matching the hostname of the host that sent facts. This works for all fact types which do not override the method in its implementation (e.g. Ansible, possibly others).
During testing today my fact queries were delayed to 75 seconds which turns out to be my OS default value. That is too much, hosts with many IP addresses can cause huge delays if DNS does not reply fast enough. This can easily overload the application server with unfinished requests.
I am proposing to shorten the DNS timeout to something sane like 250ms. If it does not return quickly, then the only drawback is that primary interface might not be detected correctly for unmanaged hosts. Not a big deal.