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

kubeovn / kube-ovn / 23583440393
24%

Build:
DEFAULT BRANCH: master
Ran 26 Mar 2026 07:58AM 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

26 Mar 2026 07:53AM UTC coverage: 24.089% (-0.05%) from 24.141%
23583440393

push

github

web-flow
fix(controller): clean orphaned attachment IPs on KubeVirt NAD hotplug (#6519)

* fix(controller): clean orphaned attachment IPs on KubeVirt NAD hotplug

When KubeVirt VEP #140 (LiveUpdateNADRef) changes a VM's secondary
network NAD reference, the old attachment IP CR and OVN LSP were never
released because keepIPCR=true (VMI still alive). This caused IP leaks
and orphaned OVN logical switch ports.

Add getVMOrphanedAttachmentPorts() to detect attachment networks on
a VM pod that are no longer in the VM's spec.template.spec.networks.
In the keepIPCR=true branch of handleDeletePod, selectively delete
orphaned attachment LSPs and release their IPs, while preserving the
shared primary network LSP and other unchanged attachment IPs.

Only vm.Spec.Template.Spec.Networks is used as the authoritative source
(not template annotations) because VEP #140 modifies spec.networks
and template annotations may not be synced.

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): also clean stale attachment IPs on new VM pod creation

Address review feedback: the orphaned attachment cleanup in
handleDeletePod only works when the NAD change happens before pod
deletion. In the stop→patch NAD→start workflow, the old pod deletion
is processed before the NAD patch, so stale IPs are missed.

Add cleanStaleVMAttachmentIPs() in reconcileAllocateSubnets to detect
and remove attachment LSPs/IPs that belong to the VM but are not part
of the current pod's networks. This ensures stale resources are cleaned
regardless of operation ordering.

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 on stale IP cleanup robustness

1. cleanStaleVMAttachmentIPs now calls getPodKubeovnNets... (continued)

0 of 126 new or added lines in 1 file covered. (0.0%)

13343 of 55390 relevant lines covered (24.09%)

0.28 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
126
15.22
-0.86% pkg/controller/pod.go
Jobs
ID Job ID Ran Files Coverage
1 23583440393.1 26 Mar 2026 07:58AM UTC 205
24.09
GitHub Action Run
Source Files on build 23583440393
  • Tree
  • List 205
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • d3070d13 on github
  • Prev Build on master (#23575974884)
  • Next Build on master (#23583978396)
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