chrony honoriert nur EINE bindaddress pro Adressfamilie. Der Generator emittierte aber eine bindaddress PRO Listen-IP (mehrere VLAN-/Cluster-VIPs) → chrony band nur die letzte (10.0.50.1), alle anderen Clients (z. B. auf 10.0.5.1) erreichten den NTP-Server NICHT. Ein Restart hilft nicht (Config-Bug, nicht stale binding). Fix: chrony.cfg.tpl emittiert KEIN bindaddress mehr → bind-all; WER bedient wird, regeln die allow-ACL + die nftables-Regeln (UDP/123 nur auf den Listen-IPs/VIPs offen, nicht öffentlich). Zugleich failover-robust: chrony bedient automatisch jede VIP, die der Node gerade hält, ohne Restart bei Master-Wechsel. Test: internal/chrony/chrony_test.go (kein bindaddress, allow vorhanden; port 0 bei serve_clients=false). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
52 lines
2.2 KiB
Smarty
52 lines
2.2 KiB
Smarty
# Generated by edgeguard — do not edit by hand.
|
|
# Re-generate via `edgeguard-ctl render-config --only=chrony`.
|
|
#
|
|
# This file lives in /etc/chrony/conf.d/edgeguard.conf — chrony's
|
|
# main /etc/chrony/chrony.conf includes the directory automatically
|
|
# (Debian default).
|
|
|
|
# ── Upstream sources ───────────────────────────────────────────
|
|
{{range .Pools}}
|
|
{{- if .Active}}
|
|
{{.Kind}} {{.Address}}{{if .Iburst}} iburst{{end}}{{if .Prefer}} prefer{{end}}{{if .MinPoll}} minpoll {{.MinPoll}}{{end}}{{if .MaxPoll}} maxpoll {{.MaxPoll}}{{end}}
|
|
{{- end}}
|
|
{{end}}
|
|
|
|
# ── Listen-Bind ────────────────────────────────────────────────
|
|
# KEIN bindaddress: chrony honoriert nur EINE bindaddress pro Adress-
|
|
# familie — bei mehreren Listen-IPs (z. B. mehrere VLAN-/Cluster-VIPs)
|
|
# würde nur die letzte gebunden, alle anderen NTP-Clients liefen ins
|
|
# Leere. Stattdessen lauscht chrony auf allen Interfaces; WER bedient
|
|
# wird, regeln die allow-ACL UNTEN + die nftables-Regeln (UDP/123 wird
|
|
# nur auf den konfigurierten Listen-IPs/VIPs geöffnet, nicht öffentlich).
|
|
# Bonus: failover-robust — chrony bedient automatisch jede VIP, die der
|
|
# Node gerade hält, ohne Restart bei Master-Wechsel.
|
|
# serve_clients=false → port 0 → kein Listen-Socket (reiner Client).
|
|
{{if .Settings.ServeClients}}
|
|
{{- range .AllowACLs}}
|
|
allow {{.}}
|
|
{{- end}}
|
|
{{else}}
|
|
port 0
|
|
{{- end}}
|
|
|
|
# ── Step + Drift ───────────────────────────────────────────────
|
|
# makestep N L: erlaubt einen step von >N Sekunden in den ersten L
|
|
# updates (wichtig wenn der Clock weit weg ist; sonst nur slew).
|
|
makestep {{.Settings.MakestepSecs}} {{.Settings.MakestepLimit}}
|
|
|
|
driftfile /var/lib/chrony/chrony.drift
|
|
|
|
{{- if .Settings.RTCSync}}
|
|
# RTC mit System-Time syncen (für Reboot-Konsistenz).
|
|
rtcsync
|
|
{{- end}}
|
|
{{- if .Settings.LeapsecTZ}}
|
|
# Leap-Sekunden via tz-Datei (nicht slew).
|
|
leapsectz {{.Settings.LeapsecTZ}}
|
|
{{- end}}
|
|
|
|
# Logging
|
|
logdir /var/log/chrony
|
|
log measurements statistics tracking
|