f-41: watchdog: sessions BGP, L3VNI et routes exportées des VPC routés #41
All checks were successful
Documentation / publish (push) Successful in 1m27s
Release Pipeline / set-release-target (push) Successful in 2s
Release Pipeline / upload-assets (agent.service, systemd/agent.service) (push) Successful in 8s
Release Pipeline / upload-assets (dhcp@.service, systemd/dhcp@.service) (push) Successful in 7s
Release Pipeline / upload-assets (dnsmasq@.service, systemd/dnsmasq@.service) (push) Successful in 7s
Release Pipeline / upload-assets (metadata@.service, systemd/metadata@.service) (push) Successful in 7s
Release Pipeline / upload-assets (run-dhcp-in-netns.sh, scripts/run-dhcp-in-netns.sh) (push) Successful in 7s
Release Pipeline / build (dhcp, amd64, linux) (push) Successful in 0s
Release Pipeline / build (agent, amd64, linux) (push) Successful in 0s
Release Pipeline / build (metadata, amd64, linux) (push) Successful in 0s
Release Pipeline / upload-assets (run-dnsmasq-in-netns.sh, scripts/run-dnsmasq-in-netns.sh) (push) Successful in 7s
Release Pipeline / checksums (push) Successful in 8s
Release Pipeline / release (push) Successful in 28s
Release Pipeline / publish (push) Successful in 0s
Release Pipeline / build (push) Successful in 2m9s

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-10-11 20:42:01 +02:00
commit 9477dc91d2
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
9 changed files with 653 additions and 1 deletions

View file

@ -6,6 +6,7 @@ import (
"time"
configuration "git.g3e.fr/syonad/two/internal/config/agent"
"git.g3e.fr/syonad/two/internal/frr"
"git.g3e.fr/syonad/two/internal/watchdog/notify"
"git.g3e.fr/syonad/two/pkg/systemd"
@ -21,6 +22,7 @@ type Watchdog struct {
logger *slog.Logger
interval time.Duration
dbusDown bool
l3 l3Probe
}
func New(db *badger.DB, cfg *configuration.Config, n notify.Notifier, logger *slog.Logger, interval time.Duration) *Watchdog {
@ -38,6 +40,7 @@ func New(db *badger.DB, cfg *configuration.Config, n notify.Notifier, logger *sl
notifier: n,
logger: logger,
interval: interval,
l3: systemProbe{frr: frr.NewClient()},
}
}
@ -71,6 +74,10 @@ func (w *Watchdog) tick() {
if err := CheckVMs(w.db, w.cfg, u, w.notifier); err != nil {
w.logger.Error("watchdog: vm check failed", "err", err)
}
CheckBGP(w.cfg, w.l3, w.notifier)
if err := CheckL3VPCs(w.db, w.cfg, w.l3, w.notifier); err != nil {
w.logger.Error("watchdog: l3 vpc check failed", "err", err)
}
}
func (w *Watchdog) units() (unitChecker, func()) {