2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-12 04:26:26 +00:00

Throttle the insecure mode boot refusal log

reply_dhcp4 logs the insecure mode remediation hint on every DHCP
discover it refuses.  A node in this state never receives a reply, so it
retries for as long as it is powered on and the same message repeats
every few seconds.

Rate limit it per hardware address the way the neighbouring boot attempt
messages already do, reusing the ignoremacs window that check_reply uses
for the missing profile hint.
This commit is contained in:
Markus Hilger
2026-08-05 03:42:22 +02:00
parent ad2d021fcc
commit 4570d9f8af
@@ -715,7 +715,9 @@ async def reply_dhcp4(node, info, packet, cfg, reqview, httpboot, cfd, profile,
if not insecuremode:
insecuremode = 'never'
if insecuremode == 'never' and not httpboot:
if rqtype == 1 and info.get('architecture', None):
if (rqtype == 1 and info.get('architecture', None)
and time.time() > ignoremacs.get(info['hwaddr'], 0) + 90):
ignoremacs[info['hwaddr']] = time.time()
log.log(
{'info': 'Boot attempt by {0} detected in insecure mode, but '
'insecure mode is disabled. Set the attribute '