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

xapi-project / xen-api / 44348812268
79%
master: 79%

Build:
Build:
LAST BUILD BRANCH: CP-314185-typed-card-order
DEFAULT BRANCH: master
Ran 18 Nov 2026 04:36PM UTC
Jobs 1
Files 36
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

18 Nov 2026 04:34PM UTC coverage: 78.996%. Remained the same
44348812268

push

github

web-flow
CP-314178: GPU lock: its operator command, and its use by xapi and xenopsd (#7384)

This PR builds on the host GPU lock that #7382 added. Please review its
seven commits one at a time: each message says what changes and why. It
targets feature/mig because only the GPU partitioning work there engages
the lock.

With this PR, an administrator can list who holds the host GPU lock and
make the lock usable again (`gpu-lock-cli status` and `ensure`). Where
the lock is engaged, xenopsd retries the NVIDIA unbind lock for about 2
s while a GPU tool has the GPU open. xapi and xenopsd now take the lock
together: xapi engages it at start where xenopsd's gpu-lock-engaged file
exists, and releases it in both daemons where GPU partitioning is not
wanted. A release that fails is retried at the next toolstack restart; a
later change makes it retry by itself.

On merge, current hosts have no lock object and no gpu-lock-engaged file
until the pool can enable partitioning, unless an administrator creates
them, so the lock is not used. What is new on them:
- the `gpu-lock-cli` command; where the lock's directory
`/run/xapi-gpu-lock` does not exist, `gpu-lock-cli status` prints "the
GPU lock is not in use on this host" on stderr and exits 0;
- one line at each xapi start: `Xapi_host.set_gpu_lock_engaged_at_start:
/var/run/nonpersistent/xenopsd/classic/gpu-lock-engaged is absent, so
xapi does not take the host GPU lock`;
- the start-up step that writes the host's GPU partitioning status, and
after a boot the GPUs' partition modes, runs on its own thread, so each
xapi start logs its start (debug) and, when it returns, its end (warn),
as for xapi's other start-up threads: `task [starting thread Sync the
GPU partitioning status of the host]` and `thread [Sync the GPU
partitioning status of the host] died`;
- the `gpu-lock-engaged-file` setting in both daemons' start-up logs.

### Testing

- `dune runtest` passes in ocaml/libs/gpu/test (38 tests),
ocaml/libs/xapi-stdext/lib/xap... (continued)

3667 of 4642 relevant lines covered (79.0%)

0.79 hits per line

Jobs
ID Job ID Ran Files Coverage
1 python3.11 - 44348812268.1 18 Nov 2026 04:35PM UTC 36
79.0
GitHub Action Run
Source Files on build 44348812268
  • Tree
  • List 36
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #44348812268
  • 3f53ae07 on github
  • Prev Build on feature/mig (#44346022435)
  • Next Build on feature/mig (#45220890202)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc