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

kubeovn / kube-ovn / 23394682787
27%

Build:
DEFAULT BRANCH: master
Ran 22 Mar 2026 03:22AM 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

22 Mar 2026 03:19AM UTC coverage: 23.56% (+0.05%) from 23.507%
23394682787

push

github

web-flow
fix(controller): prevent checkSubnetConflict from swallowing conflict errors (#6489)

* fix(controller): prevent checkSubnetConflict from swallowing conflict errors

In checkSubnetConflict, the err variable was reused for both the conflict
error and the patchSubnetStatus return value. When patchSubnetStatus
succeeded (returned nil), err was overwritten to nil, causing the function
to silently accept conflicting subnets. This allowed CIDR-overlapping
logical switches to be created in OVN.

Use a separate conflictErr variable to preserve the original error across
all three conflict checks (CIDR overlap, PolicyRoutingTableID, and node
address conflict).

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

* fix(controller): address review feedback for checkSubnetConflict

- Use errors.Join to surface both conflict and patch errors instead of
  silently discarding patchSubnetStatus failures.
- Add node address conflict test case by extending FakeControllerOptions
  with Nodes support and nodesLister initialization.

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

* fix(controller): fix same error-swallowing pattern in handleAddOrUpdateSubnet

Apply the same fix to four more occurrences in handleAddOrUpdateSubnet
where patchSubnetStatus overwrites the original OVN operation error:
- LogicalSwitchUpdateLoadBalancers failure (AddLbToLogicalSwitchFailed)
- SetLogicalSwitchPrivate failure (SetPrivateLogicalSwitchFailed)
- DeleteAcls failure (ResetLogicalSwitchAclFailed)
- UpdateLogicalSwitchACL failure (SetLogicalSwitchAclsFailed)

Without this fix, the work queue would not retry these failed operations
because the handler returned nil when patchSubnetStatus succeeded.

Signed-off-by: Mengxin Liu <liumengxinfly@g... (continued)

12 of 42 new or added lines in 1 file covered. (28.57%)

13008 of 55213 relevant lines covered (23.56%)

0.27 hits per line

Uncovered Changes

Lines Coverage ∆ File
30
8.79
1.22% pkg/controller/subnet.go
Jobs
ID Job ID Ran Files Coverage
1 23394682787.1 22 Mar 2026 03:22AM UTC 205
23.56
GitHub Action Run
Source Files on build 23394682787
  • Tree
  • List 205
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • e8ba7b0f on github
  • Prev Build on master (#23382222605)
  • Next Build on master (#23396400685)
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