Shorten DNS timeout for primary NIC detection
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.
#1 Updated by The Foreman Bot about 1 year ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/9108 added
#2 Updated by The Foreman Bot about 1 year ago
- Fixed in Releases 3.3.0 added
#3 Updated by Lukas Zapletal about 1 year ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|8e28a45df1afa92adb8dfc81517f8b22a5e1246c.
Fixes #34462 - shorten DNS timeout for primary detection
Signed-off-by: Lukas Zapletal <firstname.lastname@example.org>