Repository navigation
backport: v4.0.2 volume lifecycle fixes to v3.x as 3.2.6 - #302
Merged
Merged
Conversation
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> (cherry picked from commit 1bbcba1)
qm destroy calls path() and skips any disk whose owner != vmid. The multipath plugin returned the LUN id (usually 0) as the owner and the storeid as the vtype, so every truenas-multipath disk was silently left behind on TrueNAS while the task reported OK. Also make _naa_to_wwid return undef for a missing NAA: it returned a truthy "3", which pointed path()/activate_volume at /dev/mapper/3 and bypassed the #292 placeholder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 147b461)
alloc_image already creates cloud-init drives under PVE's standard name, but parse_volname only knew disk-N and state-* volumes, so every later operation on the drive - including qm destroy - died with "unable to parse TrueNAS volume name". base- variant covers templates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit c45c3b0)
…t context (#294) PVE's content API (and the bpg/proxmox Terraform provider through it) calls volume_size_info in list context and dies "no format" when the second value is missing, so every disk on a truenas storage failed to refresh. Mirrors ZFSPoolPlugin: used comes from usedbydataset, and a missing zvol now dies instead of reporting a size of 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 664dfe6)
Without an override the base Plugin.pm resize dies "can't resize this image format", which blocked qm disk resize, the GUI and Terraform's cloud-image provisioning. Grows the zvol via pool/dataset update (1 MiB-aligned, integer volsize for SCALE's Pydantic). The WebSocket transport gains the PUT -> pool.dataset.update mapping it needs. Multipath additionally rescans the target's kernel sessions and runs multipathd resize map when the device is active on this node, since QMP block_resize on a host_device can't grow past the stale dm size. Backport note: release/3.x is REST-only, so the WebSocket PUT -> pool.dataset.update mapping from the original commit is dropped. (cherry picked from commit 312cfa8) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…299) TrueNASMultipath.pm calls the base plugin's private helpers, and from 4.0.2 it also calls SUPER::volume_resize. So it only works with the truenas-proxmox built from the same commit. `>= 3.1.0` let apt pair 4.0.2 multipath with a 3.2.5 or 4.0.1 base, which fails at runtime. `(= ${VERSION})` makes apt upgrade or hold the two together. A CI check fails the build if the template ever drifts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit ccc4ae2)
The 4.0.2 fixes above are cherry-picked for v3 users who can't move to v4 yet. This adds the version bump, CHANGELOG and Debian changelog entries, and README version numbers retargeted to the 3.x line (3.2.5 and earlier / fixed in 3.2.6), so v3 readers aren't told to upgrade to a version on a track they don't use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
During the 3.2.6 live test, `qm cloudinit update` failed on a running VM on all three SCALE storages, with "Tray of the device is not open". It passed on CORE and on v4.0.2 (even 1 s after VM start), and succeeded on retry. Timing the REST call showed why: SCALE answers in 0.8–3.1 s, compared with 0.09 s on CORE. That stretches PVE's open-tray → attach → insert sequence long enough for the guest to close the tray. It isn't a backport defect (3.2.5 couldn't do cloud-init at all). It's the slow deprecated REST API that v4's WebSocket transport replaces. This adds a README troubleshooting entry with workarounds, and the CHANGELOG known-limitation and verification notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of the v4.0.2 fixes to the archived v3.x line (ADR-013), as v3.2.6. Cherry-picked with
-xfrommain:path()+t/harness +provein CIpath()owner/vtype,_naa_to_wwid(undef)parse_volnamevolume_size_infovolume_resizePUT→pool.dataset.updatemapping is dropped, because v3.x is REST-only. The resize itself uses_api(PUT /pool/dataset/id/…), which v3 has.Depends+ CI guardThe last commit (54709a3) covers housekeeping:
$VERSION3.2.6, plus CHANGELOG[3.2.6]with a "Not backported" note.3.2.6-1.Testing:
prove t/gives 4 files and 55 assertions, all passing on the v3 base. The REST code path is the same one live-verified for 4.0.2 against CORE 13.0-U6.8. A v3.2.6 build has not been live-tested on a node yet.🤖 Generated with Claude Code