feat: HA-Cluster v1.2.x — Split-Brain, TOTP, Enterprise-FW, Drift-Fix, VIP-Recovery
- keepalived: pg_role='standby' hat Vorrang vor role für BACKUP-Bestimmung - keepalived-master.sh: gecrasht Dienste beim MASTER-Übergang starten (nicht nur reload) - confighash: ip_addresses per Interface-Name hashen statt per FK (Cross-Node-Drift-Fix) - TOTP/2FA: RFC 6238 — Setup-Flow, QR-Code, Admin-Disable; two-step Login - Firewall-UI: Enterprise-Design — auto-Beschreibung, icon-only Actions, zero-hit Indikator - fe80-Filter: Link-local IPv6 aus NTP/DNS Listen-Dropdowns entfernen - VIP-Dashboard, Dual-Path VRRP, GW-Tracking (Migrations 0033/0034) - Forward Proxy + DNS erweiterte Einstellungen (Migrations 0031/0032) - unbound-control: edgeguard in unbound-Gruppe via postinst Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,11 +3,22 @@
|
||||
#
|
||||
# KEIN Auto-Promote — Split-Brain-Schutz durch manuelle Promotion.
|
||||
# Admin muss "edgeguard-ctl promote" ausführen wenn PG-Failover gewünscht.
|
||||
#
|
||||
# Was wir tun: Alert loggen + edgeguard-api benachrichtigen.
|
||||
|
||||
logger -t keepalived -p daemon.warning \
|
||||
"MASTER: VIP übernommen — PG-Rolle ist noch '$(cat /var/lib/edgeguard/pg_role 2>/dev/null || echo standby)'. Für PG-Failover: edgeguard-ctl promote"
|
||||
|
||||
# Dienste reloaden/starten damit sie die neu aktiven VIPs binden.
|
||||
# Squid + Unbound + HAProxy binden beim Start an spezifische IPs — war der Dienst
|
||||
# während des BACKUP-Zustands gecrasht oder gestoppt, muss er gestartet werden.
|
||||
for svc in squid.service unbound.service haproxy.service; do
|
||||
if systemctl is-active --quiet "$svc"; then
|
||||
systemctl reload "$svc" 2>/dev/null || systemctl restart "$svc" 2>/dev/null || true
|
||||
else
|
||||
systemctl start "$svc" 2>/dev/null || true
|
||||
fi
|
||||
done
|
||||
logger -t keepalived -p daemon.info "MASTER: squid/unbound/haproxy reload-or-start nach VIP-Übernahme"
|
||||
|
||||
# Alert an die API schicken (best-effort, ignoriert Fehler)
|
||||
curl -sf --max-time 3 -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
|
||||
Reference in New Issue
Block a user