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

kubeovn / kube-ovn / 24645499004
25%

Build:
DEFAULT BRANCH: master
Ran 20 Apr 2026 02:25AM UTC
Jobs 1
Files 207
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 Apr 2026 02:23AM UTC coverage: 24.726% (+0.009%) from 24.717%
24645499004

push

github

web-flow
fix(slr): snapshot subnet/VPC in SwitchLBRuleInfo to avoid VIP leak (#6651)

* fix(slr): snapshot subnet/VPC in SwitchLBRuleInfo to avoid VIP leak

When two SLRs share a health-check VIP and are deleted back-to-back,
handleDelSwitchLBRule can race a concurrent service-delete event: the
service worker's LoadBalancerDeleteVip may remove the LBHC (flipping
ignoreHealthCheck to false due to non-empty IPPortMappings) before the
SLR delete worker runs. servicesLister.Get then returns NotFound,
leaving subnetForVip empty, so both the orphaned-LBHC branch and the
subnet fallback are skipped and the health-check VIP CR is never
deleted. Its IP keeps the subnet's usingIPs > 0, blocking finalizer
removal and stranding the subnet in Terminating.

Capture subnet/VPC from the SLR annotations at enqueue time via
SwitchLBRuleInfo and fall back to them when the service lister no
longer has the service. Also drop the redundant explicit service
deletes from the e2e ip_port_mapping tests — the SLR delete handler
already owns that cleanup, and the extra delete only widens the race.

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

* test(slr): cover info.Subnet/VPC fallback in handleDelSwitchLBRule

Adds two unit test cases that exercise the race scenario where the
backing Service has been removed from both the informer cache and the
API before the SLR delete worker runs. The first asserts that VIP
cleanup still succeeds via info.Subnet; the second verifies that
info.VPC keeps the cross-VPC scoping intact so a health check owned
by another VPC is left alone.

Addresses review feedback on #6651.

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

---------

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

6 of 8 new or added lines in 1 file covered. (75.0%)

13974 of 56515 relevant lines covered (24.73%)

0.29 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
26.81
1.09% pkg/controller/switch_lb_rule.go
Jobs
ID Job ID Ran Files Coverage
1 24645499004.1 20 Apr 2026 02:25AM UTC 207
24.73
GitHub Action Run
Source Files on build 24645499004
  • Tree
  • List 207
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • c8cd03c4 on github
  • Prev Build on master (#24633338548)
  • Next Build on master (#24649490051)
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