Skip to content

Commit 035351f

Browse files
19061 FIX DNS cache: Prevent superfluous queries
While updating the DNS cache, Checkmk performed DNS queries also for hosts with statically configured IP addresses. This was caused by an erroneous swap of dictionaries containing the configured IPv4 and IPv6 addresses in the call stack. This werk removes the swap such that no DNS query is executed for hosts with a configured IP address. To benefit from this fix, no manual interaction is required. SUP-26752 Change-Id: Ieb0a9d3a83165d91dda5545d8349daa7ccb23963
1 parent 4e12163 commit 035351f

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

.werks/19061.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[//]: # (werk v2)
2+
# DNS cache: Prevent superfluous queries
3+
4+
key | value
5+
---------- | ---
6+
date | 2026-01-02T12:13:07+00:00
7+
version | 2.3.0p42
8+
class | fix
9+
edition | cre
10+
component | core
11+
level | 2
12+
compatible | yes
13+
14+
While updating the DNS cache, Checkmk performed DNS queries also for hosts with statically configured IP addresses.
15+
This was caused by an erroneous swap of dictionaries containing the configured IPv4 and IPv6 addresses in the call stack.
16+
17+
This werk removes the swap such that no DNS query is executed for hosts with a configured IP address.
18+
19+
To benefit from this fix, no manual interaction is required.
20+

cmk/base/modes/check_mk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,8 +785,8 @@ def mode_update_dns_cache() -> None:
785785
for hn in set(hosts_config.hosts).union(hosts_config.clusters)
786786
if config_cache.is_active(hn) and config_cache.is_online(hn)
787787
),
788-
configured_ipv6_addresses=config.ipaddresses,
789-
configured_ipv4_addresses=config.ipv6addresses,
788+
configured_ipv6_addresses=config.ipv6addresses,
789+
configured_ipv4_addresses=config.ipaddresses,
790790
simulation_mode=config.simulation_mode,
791791
override_dns=HostAddress(config.fake_dns) if config.fake_dns is not None else None,
792792
)

0 commit comments

Comments
 (0)