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

kubeovn / kube-ovn / 23479723791
27%

Build:
DEFAULT BRANCH: master
Ran 24 Mar 2026 08:21AM 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

24 Mar 2026 08:18AM UTC coverage: 23.859% (+0.04%) from 23.818%
23479723791

push

github

web-flow
fix(daemon): use multiple KubeVirt labels for VM launcher pod lookup (#6512)

* fix(daemon): use multiple KubeVirt labels for VM launcher pod lookup

The gcInterfaces() function only used the deprecated vm.kubevirt.io/name
label to find launcher pods for KubeVirt VMs. This label is unreliable
when VMs have custom hostnames set (spec.template.spec.hostname), as
KubeVirt copies the hostname instead of the VM name into the label.
This could cause OVS interfaces to be incorrectly garbage collected.

Extract isVMLauncherPodAlive() with a three-tier lookup strategy:
1. vmi.kubevirt.io/id label (unique, KubeVirt >= 1.7)
2. vm.kubevirt.io/name label (fallback for older KubeVirt)
3. kubevirt.io/domain annotation (handles VMI names > 63 chars)

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(daemon): rename podName to vmiName and support cached pod list

Address review feedback:
- Rename podName parameter to vmiName for clarity since OVS
  external_ids stores the VMI name, not the Kubernetes pod name
- Accept optional pre-fetched pod list for annotation fallback to
  avoid repeated List(labels.Everything()) calls in a loop
- Update log messages to use "vmi" instead of "vm"

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(daemon): simplify isVMLauncherPodAlive by removing namespacePods parameter

Remove the optional pre-fetched pod list parameter. Instead, use a
label selector with DeprecatedVirtualMachineNameLabel Exists requirement
to narrow down candidates to virt-launcher pods only in the annotation
fallback, avoiding a full namespace pod scan.

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 <li... (continued)

31 of 43 new or added lines in 1 file covered. (72.09%)

1 existing line in 1 file now uncovered.

13169 of 55194 relevant lines covered (23.86%)

0.28 hits per line

Uncovered Changes

Lines Coverage ∆ File
12
4.23
4.23% pkg/daemon/controller.go

Coverage Regressions

Lines Coverage ∆ File
1
4.23
4.23% pkg/daemon/controller.go
Jobs
ID Job ID Ran Files Coverage
1 23479723791.1 24 Mar 2026 08:21AM UTC 205
23.86
GitHub Action Run
Source Files on build 23479723791
  • Tree
  • List 205
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • f701ecc3 on github
  • Prev Build on master (#23479304925)
  • Next Build on master (#23479972711)
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