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.
Updated by The Foreman Bot almost 3 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/9108 added
Updated by Lukas Zapletal almost 3 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|8e28a45df1afa92adb8dfc81517f8b22a5e1246c.