Fix
- GitHub #134: close the i==25 reconnect blind spot in
_nvme_device_for_uuid, harden the fuser-based in-use probe. A VM being provisioned on an NVMe-oF subsystem could tear down the shared controller mid-flight and knock out every other running VM on the same subsystem. Two combined defects produced this:- The i==25 "stale connection" branch was the only mid-loop reconnect site without an in-use guard. Its precondition
!$ever_saw_devicesreads as "the subsystem is empty," but$ever_saw_devicesis set from the target UUID lookup'slinux_device_count, not the subsystem total — a shared subsystem with 48 live namespaces could satisfy this for the whole 15s loop and still see the reconnect fire. The branch now carries the same in-use guard the i==10 / i==35 / i==75 / i==150 branches use. _nvme_check_devices_in_useinterpretedrun_command's outcome as$@ ? 0 : 1, collapsing every non-success exit (spawn failures, timeouts, signal deaths) into "not in use". It now usesrun_command(noerr => 1)and distinguishes exit 0 (in use) from exit 1 (idle) from anything else (unknown — fail-safe = assume in use).
- The i==25 "stale connection" branch was the only mid-loop reconnect site without an in-use guard. Its precondition
Diagnostics
- Uniform structured logging across every reconnect site in
_nvme_device_for_uuid. FIRING and SKIPPED lines now carry the iteration label (i==10 / i==25 / i==35 / i==75 / i==125 / i==150), the reason,dev_pathscount, andin_usevalue — field reports can pin the responsible branch directly instead of inferring from timing.
Validation
- Unit test (mocked helpers forcing
linux_device_count=0 + in_use=1at i==25): unpatched build fires the reconnect; patched build logs the new SKIPPED line and does not call_nvme_disconnect. proxmox-test-runner storage-plugin-validationagainsttruenas-storage, 2 iterations: PASS (incomplete) — 21 validated, 0 unsupported, 3 not tested, 0 failed per iteration.
The .deb artifact is uploaded by the tag-push CI.
Full Changelog: v2.1.24-beta4...v2.1.24-beta5