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

zeeke / sriov-cni / 13441746227 / 1
40%
master: 46%

Build:
Build:
LAST BUILD BRANCH: us/lock-file-integration-test
DEFAULT BRANCH: master
Ran 20 Feb 2025 06:06PM UTC
Files 10
Run time 0s
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 Feb 2025 06:04PM UTC coverage: 40.146%. Remained the same
13441746227.1

push

github

zeeke
Lock PCI allocated file

When running on heavy a load, sriov-cni might be invoked multiple times
by the kubelet or the container runtime. In these situations, it might happen
that a `cmdAdd` or a `cmdDel` run on the same device that is still handled by
a `cmdDel` instance (e.g. when the IPAM plugin takes a long time to finish).

This commit adds a Lock mechanism around the `/var/lib/cni/sriov/<PCI>.lock` file,
to avoid two or more instances handling the same the device.
The lock is based on `flock` [1] using the `O_CLOEXEC` flag, which  garantees that the lock
is released when the process finishes.

[1] https://linux.die.net/man/2/flock

Signed-off-by: Andrea Panattoni <apanatto@redhat.com>

550 of 1370 relevant lines covered (40.15%)

2.11 hits per line

Source Files on job 13441746227.1
  • Tree
  • List 10
  • Changed 1
  • Source Changed 1
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 13441746227
  • 2c344954 on github
  • Prev Job for on us/ocpbugs-45028 (#12802984914.1)
  • Next Job for on us/ocpbugs-45028 (#13441785887.1)
  • Delete
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