BGP Controller: add a log when we close the bgp session
Trying to debug a ci failure where the config handler was stuck for 20
seconds. We know when we try to close, we don't know how long it took to
close.
@@ -85,11 +85,13 @@ newPeers:
continue
}
level.Info(l).Log("event", "peerRemoved", "peer", p.cfg.Addr, "reason", "removedFromConfig", "msg", "peer deconfigured, closing BGP session")
+
if p.session != nil {
if err := p.session.Close(); err != nil {
level.Error(l).Log("op", "setConfig", "error", err, "peer", p.cfg.Addr, "msg", "failed to shut down BGP session")
}
}
+ level.Debug(l).Log("event", "peerRemoved", "peer", p.cfg.Addr, "reason", "removedFromConfig", "msg", "peer deconfigured, BGP session closed")
}
err := c.syncBFDProfiles(cfg.BFDProfiles)
