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

kubeovn / kube-ovn / 23327398190
23%

Build:
DEFAULT BRANCH: master
Ran 20 Mar 2026 03:11AM UTC
Jobs 1
Files 205
Run time 1min
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

20 Mar 2026 03:08AM UTC coverage: 23.361% (-0.01%) from 23.375%
23327398190

push

github

web-flow
fix(daemon): create listen sockets before starting controller to avoid race (#6478)

* fix(daemon): create listen sockets before starting controller to avoid race

The daemon starts a metrics/health server and the controller
concurrently. The controller's configProviderNic() transfers IP
addresses from the physical NIC to an OVS bridge. If the metrics
server's bind() call races with this transfer, it fails with
"cannot assign requested address" and calls LogFatalAndExit,
crashing the daemon.

On restart, the new daemon instance finds the IP address already
on br-provider but the IPv4 default route permanently lost (the
kernel removed it when the address was deleted from eth0, and the
first instance crashed before transferring routes). This leaves
the node unable to reach external endpoints, causing image pull
failures for all subsequent pod creations.

Fix by creating all listen sockets (metrics, health, connectivity
check) synchronously before starting the controller. Once a socket
is bound, it survives the address transfer from eth0 to br-provider.

Additionally, refactor StartMetricsOrHealthServer to create the TCP
listener synchronously (outside the goroutine) and introduce
ServeWithListener() that accepts a pre-created net.Listener, avoiding
the internal createListener() call in controller-runtime's server.Start().

Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>

* fix(daemon): address review feedback

- Use distinct variable names for TCP/UDP listen addresses
- Apply auth filter to pprof endpoints when secureServing is enabled,
  matching the controller-runtime FilterProvider behavior
- Reuse existing package constants for HTTP server timeouts

Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>

* fix(daemon): rewrite Run() to use ServeWithListener for all components

Replace the controller-runtime based Run() implementation with a thin
wrapper that creates a net.Listener synchronously then delegates to
ServeWithListener(). This ensures ... (continued)

0 of 108 new or added lines in 2 files covered. (0.0%)

3 existing lines in 1 file now uncovered.

12899 of 55215 relevant lines covered (23.36%)

0.27 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
13
0.0
0.0% pkg/metrics/servers.go
95
25.53
-4.47% pkg/metrics/server.go

Uncovered Existing Lines

Lines Coverage ∆ File
3
25.53
-4.47% pkg/metrics/server.go
Jobs
ID Job ID Ran Files Coverage
1 23327398190.1 20 Mar 2026 03:11AM UTC 205
23.36
GitHub Action Run
Source Files on build 23327398190
  • Tree
  • List 205
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 92443433 on github
  • Prev Build on master (#23327227181)
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