f-87: agent: bridge public = interfaces.internet, watchdog du segment #87

Le veth vp-<id>-e rejoint cfg.PublicBridge() (interfaces.internet, br-public
par défaut, jamais default_interface). Le watchdog signale un bridge public
absent, éteint ou sans port VXLAN. config.exemple.yml : internet: br-public.

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-10-25 23:36:14 +01:00
commit 26095062c8
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
10 changed files with 200 additions and 3 deletions

View file

@ -23,6 +23,7 @@ type Watchdog struct {
interval time.Duration
dbusDown bool
l3 l3Probe
public publicProbe
}
func New(db *badger.DB, cfg *configuration.Config, n notify.Notifier, logger *slog.Logger, interval time.Duration) *Watchdog {
@ -41,6 +42,7 @@ func New(db *badger.DB, cfg *configuration.Config, n notify.Notifier, logger *sl
logger: logger,
interval: interval,
l3: systemProbe{frr: frr.NewClient()},
public: systemPublicProbe{},
}
}
@ -74,6 +76,7 @@ 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)
}
CheckPublicSegment(w.cfg, w.public, w.notifier)
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)