fix: let path() return a placeholder for extent-less zvols (#292)

PVE's content delete (pvesm free, GUI Remove) and qm destroy call path()
only for the owner/vtype before vdisk_free. Dying when the zvol had no
iSCSI extent made orphans from failed allocs or v2-era leftovers
undeletable through PVE, even though free_image already handles the
no-extent case. activate_volume and qemu_blockdev_options keep dying on
the same condition, so the placeholder can never be opened by a VM.

Adds the first Perl unit-test harness (t/, prove in CI lint job) with a
mock TrueNAS API so plugin entry points can be tested off a PVE node.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Adams
2026-10-12 11:57:43 -04:00
co-authored by Claude Opus 5.5
parent 3657693ae6
commit 1bbcba136b
8 changed files with 226 additions and 11 deletions
+5
View File
@@ -74,6 +74,11 @@ jobs:
packaging/DEBIAN-multipath/postrm
echo "Shell scripts OK"
- name: Perl unit tests
run: |
echo "==> Running prove t/..."
prove -v t/
- name: Test postinst/postrm service restarts
run: |
echo "==> Running tests/test-restart-services.sh..."