• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubeovn / kube-ovn / 28634787952 / 1
27%
master: 27%

Build:
DEFAULT BRANCH: master
Ran 03 Jul 2026 02:41AM UTC
Files 218
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Jul 2026 02:39AM UTC coverage: 27.406% (+0.02%) from 27.391%
28634787952.1

push

github

web-flow
fix: improve BGP BFD metrics, logging, type safety and peer state check (#6941)





* refactor(speaker): improve BFD logging, type safety and peer state monitoring

- BFDDetectionMultiplier: uint32 → uint8 with pflag.Uint8 (RFC 5880 §6.8.1)
- Add ms→μs overflow validation (MaxUint32/1000 boundary)
- BFD stats: log only on errors (Warningf) or recovery (Infof)
- BFD peer state: diff caching, log only on state change
- Add watchPeerState() for BGP peer state change monitoring with BFD state
- Move newBFDPeerConfig() to bfd.go with explicit uint32 cast

* feat(speaker): add BGP/BFD Prometheus metrics and delta-based BFD error logging

Expose per-peer BGP session state/flap/queue/message counters and BFD
server/peer statistics as gauges on the existing speaker metrics endpoint,
following Cilium's gauge-based design for cumulative counters so PromQL
rate()/increase() can derive per-interval deltas. Metrics are registered to
the controller-runtime registry and collected each reconcile cycle, gated by
--enable-metrics (and --enable-bfd for BFD).

Also switch BFD server error logging from an absolute (>0) check to
delta-based detection: warn only when error counters increase since the last
sample, handle counter reset/rollover, and include the per-counter delta in
the warning to avoid permanent warnings from non-resetting cumulative counters.

- Wrap ListPeer/ListBfdPeer in context.WithTimeout(3s). The reconcile loop
  runs serially via wait.Until, so an unbounded gRPC call to a hung GoBGP
  server would block the entire loop (route sync included), not just metrics.
- Replace the per-cycle Reset() of every per-peer series with delta-based
  deletion driven by lastBGPPeers/lastBFDPeers. Reset() exposed a brief empty
  window to a concurrent Prometheus scrape (metric flapping); deleting only
  the series of peers that disappeared removes that window.
- On ListPeer error, keep the previous series instead of blanking them.
---------

Signed-off-by: zbb88888 <jmd... (continued)

16632 of 60688 relevant lines covered (27.41%)

0.32 hits per line

Source Files on job 28634787952.1
  • Tree
  • List 218
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 28634787952
  • c001e6c8 on github
  • Prev Job for on master (#28633980013.1)
  • Next Job for on master (#28635649046.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc