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

kubeovn / kube-ovn / 23633945170
24%

Build:
DEFAULT BRANCH: master
Ran 27 Mar 2026 06:19AM 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

27 Mar 2026 06:17AM UTC coverage: 24.203% (+0.1%) from 24.096%
23633945170

push

github

web-flow
feat(controller): support per-pod NIC granular DHCP control via annotations (#6475)

* feat(controller): support per-pod NIC granular DHCP control via annotations

Allow pod annotations to override subnet-level DHCP settings at the
per-LSP (logical switch port) granularity. Annotations follow the
provider-prefixed format:
  <provider>.kubernetes.io/dhcp-v4-options
  <provider>.kubernetes.io/dhcp-v6-options

Key behaviors:
- Pod annotation takes highest priority and overrides subnet enableDHCP
- Supports multi-NIC (Multus) by scoping annotations per provider name
- Override semantics: annotation completely replaces subnet-level DHCP
- GC extended to clean up orphaned per-port DHCP_Options entries
- reconcilePodDHCPOptions handles annotation changes on running pods

Implementation:
- Unified internal OVN DHCP_Options helpers (portName="" = subnet-level,
  portName!="" = per-port) to eliminate code duplication
- Added PortKey ExternalID to discriminate per-port from subnet entries
- Extracted getSubnetMTU() helper for reuse across controllers
- Added SetLogicalSwitchPortDHCPOptions for targeted LSP DHCP field update

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

* fix(controller): address review issues in per-pod DHCP options

Fix all issues raised in code review:

Bug fixes:
- Fix error messages: "logical router name" -> "logical switch name"
- Add portName validation in DeleteDHCPOptionsForPort to prevent
  accidentally deleting all per-port entries when portName is empty
- Add lsName/portName validation and dual-stack bounds check in
  UpdateDHCPOptionsForPort
- Fix per-family override semantics: on dual-stack subnets, only create
  per-port DHCP_Options for families with a non-empty annotation value;
  fall back to subnet-level UUIDs for un-annotated families
- Add missing nil assertion in GetDHCPOptions isolation test

Improvements:
- Add no-op fast path in SetLogicalSwitchPortDHCPOptions to avoid
  unnecessary OVN NB transactions when DHCP ... (continued)

154 of 321 new or added lines in 5 files covered. (47.98%)

1 existing line in 1 file now uncovered.

13476 of 55678 relevant lines covered (24.2%)

0.28 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
0.91
0.02% pkg/controller/gc.go
23
10.01
-0.02% pkg/controller/subnet.go
37
74.32
-3.23% pkg/ovs/ovn-nb-dhcp_options.go
41
76.98
-2.16% pkg/ovs/ovn-nb-logical_switch_port.go
64
14.83
-0.39% pkg/controller/pod.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
74.32
-3.23% pkg/ovs/ovn-nb-dhcp_options.go
Jobs
ID Job ID Ran Files Coverage
1 23633945170.1 27 Mar 2026 06:19AM UTC 205
24.2
GitHub Action Run
Source Files on build 23633945170
  • Tree
  • List 205
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • b2d57d79 on github
  • Prev Build on master (#23630179185)
  • Next Build on master (#23637822463)
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