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

kubeovn / kube-ovn / 26011673291
27%

Build:
DEFAULT BRANCH: master
Ran 18 May 2026 03:24AM UTC
Jobs 1
Files 212
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

18 May 2026 03:19AM UTC coverage: 24.981% (+0.03%) from 24.951%
26011673291

push

github

web-flow
fix(webhook): reject same-family duplicates in ip_address annotation (#6746)

The ovn.kubernetes.io/ip_address annotation is meant to carry a single
static address per family (optionally one IPv4 + one IPv6 for dual
stack). The webhook used to accept values like "10.0.0.1,10.0.0.2",
since checkIPConflict only validated each entry against existing IP
CRs and never bounded the count per family.

Downstream of the webhook this is a real bug, not just ambiguous input:

* pkg/ipam.Subnet keeps V4NicToIP/V6NicToIP as single-value maps, so
  the second IPv4 allocation overwrites the first and the pod ends up
  tracked as owning only the last address. Pod deletion then leaks the
  first IP because the nic-keyed release path cannot see it.
* pkg/ipam.checkAndAppendIpsForDual triggers dual-stack auto-completion
  on len(ips) == 2. Two same-family IPs satisfy that count check, so a
  dual-stack subnet silently degrades to single stack with no IPv6
  ever assigned.

Add checkIPAddressFamilyUniqueness, invoked from validateIPConflict
before checkIPConflict, that counts addresses per family and rejects
the annotation when either family exceeds one. The wording mirrors the
upstream antrea fix (antrea-io/antrea#7994). The ip_pool annotation is
deliberately left untouched: it is a candidate-pool semantic and
StatefulSet ordinal indexing relies on having multiple addresses of
the same family.

Invalid IPs inside the value are not reported here; they fall through
to checkIPConflict so the existing "invalid static ip/ippool annotation
value" error wording stays the only source of truth for parse errors.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>

27 of 30 new or added lines in 1 file covered. (90.0%)

2 existing lines in 1 file now uncovered.

14310 of 57283 relevant lines covered (24.98%)

0.29 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
15.08
15.08% pkg/webhook/static_ip.go

Coverage Regressions

Lines Coverage ∆ File
2
74.6
-0.53% pkg/ovs/ovn-nb-logical_router_route.go
Jobs
ID Job ID Ran Files Coverage
1 26011673291.1 18 May 2026 03:24AM UTC 212
24.98
GitHub Action Run
Source Files on build 26011673291
  • Tree
  • List 212
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 46689a97 on github
  • Prev Build on master (#25965326032)
  • Next Build on master (#26012462472)
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