mirror of
https://github.com/TheGrandWazoo/freenas-proxmox.git
synced 2026-09-30 03:51:27 +02:00
AnyEvent::WebSocket::Client's blocking ->recv() cannot run inside pveproxy/pvedaemon (themselves built on AnyEvent as their core reactor) without nesting event loops, which AnyEvent refuses by design -- confirmed by a real user on the first real WebUI use of v4.0.0, one day after release. Not a race condition: this fails on every real "Add Storage" attempt against a WebSocket-transport host, unconditionally. v4.0.0's testing never caught it because every verification script ran standalone, never inside the actual daemon process -- pvesm (a fresh CLI process) doesn't trigger it either, only the real REST API path through pveproxy does. Replaced _ws_connect/_ws_call's internals with Protocol::WebSocket::Client + IO::Socket::SSL -- a plain synchronous socket client with zero event-loop dependency, so there's no shared reactor state to conflict with pveproxy's. _api_ws's method-mapping logic is completely unchanged; only the connection/call internals were rewritten. Reproduced the exact bug via a real POST to /api2/json/storage through pveproxy on a lab node, then confirmed the fix resolves it the same way. Re-ran every check from v4.0.0's release (read path, write path, snapshots, multipath) against the new transport -- zero regressions. Full story: ADR-014, superseding ADR-012's library-choice section only (everything else in ADR-012 stands). $VERSION bumped to 4.0.1. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
11 KiB
11 KiB
Changelog
All notable changes to this project will be documented here.
Format follows Keep a Changelog. Versions follow Semantic Versioning independent of Proxmox VE or TrueNAS versions. See each GitHub Release for the specific Proxmox VE and TrueNAS versions supported.
[4.0.1] — 2026-09-01
Fixed
- WebSocket transport failed on every real "Add Storage" attempt against a
TrueNAS SCALE 25.04+ host —
create storage failed: TrueNAS WebSocket connect to ... failed: AnyEvent::CondVar: recursive blocking wait attempted(#290, reported the day after v4.0.0 shipped). Root cause:pveproxy/pvedaemonare themselves built onAnyEventas their core reactor, so the plugin's blockingAnyEvent::WebSocket::Client->recv()nested inside the daemon's own already-running event loop, whichAnyEventrefuses by design. Not a race condition — this failed on every real WebUI/API use, unconditionally; v4.0.0's testing never caught it because every verification script ran standalone, never inside the actual daemon process. See ADR-014. - Replaced the transport with
Protocol::WebSocket::Client+IO::Socket::SSL— a plain synchronous socket client with zero event-loop dependency of any kind, so there's no shared reactor state to conflict with._api_ws's method-mapping logic is completely unchanged; only the connection/call internals (_ws_connect,_ws_call) were rewritten. - Fixed a
perlcriticRequireFinalReturnfinding surfaced while rewriting_ws_call(unrelated to the bug itself, caught during the same pass).
Changed
packaging/DEBIAN/control.j2dependencies:libanyevent-perlandlibanyevent-websocket-client-perlremoved;libprotocol-websocket-perlandlibio-socket-ssl-perladded (both apt-available on Debian trixie).
Verified
- Full re-run of every check from v4.0.0's release (read path, write path, snapshots, multipath) against the new transport — all pass, zero regressions.
- The actual bug reproduction, re-run against the fix: the exact
POST /api2/json/storagerequest that reproduced #290 via the realpveproxy/pvedaemonon a lab node now returns HTTP 200 and a working,activestorage — this is the verification that matters for this release.
[4.0.0] — 2026-08-31 — Rivendell
See ADR-012 (Accepted) and ADR-013 for the full design and live-verification history.
Added
- WebSocket JSON-RPC 2.0 transport for TrueNAS SCALE 25.04+ (
_api_ws,_ws_connect,_ws_call,_transport()), auto-detected per host —storage.cfgis unchanged either way. TrueNAS CORE and SCALE < 25.04 continue to use the existing REST v2.0 transport, unmodified (#243) - New dependency:
libanyevent-websocket-client-perl(pulls inlibanyevent-perl), added topackaging/DEBIAN/control.j2and CI's lint job — only affects the v4 line (v4/rivendellapt dist), v3.x is unaffected (archived atrelease/3.xper ADR-013)
Verified (live, against real TrueNAS hosts)
- Every read (query) call the plugin makes, across three TrueNAS SCALE versions (25.10.3.1, 25.10.6, 25.04.2.6)
- Full
alloc_image/path/volume_size_info/free_imagewrite cycle — target, extent, targetextent, and dataset create+delete, zero orphans - Full snapshot cycle —
volume_snapshot/_info/_rollback/_delete - REST-path regression check against TrueNAS CORE (a real production box) —
confirms the new
_api()dispatcher doesn't break hosts that never touch WebSocket - Multipath (
truenas-proxmox-multipath) over the WebSocket transport — zero code changes needed toTrueNASMultipath.pm, confirmed via a fullactivate_volume/deactivate_volumecycle producing a real 2-pathdm-multipathdevice
Fixed (caught during the above verification, before ever shipping)
_transport()'s first draft checked/system/product_type eq 'SCALE'to distinguish CORE from SCALE — that field returns the license tier (e.g.COMMUNITY_EDITION), not the product family. Fixed to parse/system/version's magnitude insteadiscsi.target.delete/iscsi.targetextent.deletewere passed a regex-captured id as a string; Pydantic requires an integeriscsi.extent.delete(id, remove, force)is positional, not(id, {force=>bool})— the REST-style options hash was landing in theremoveslot
Known deferred
- #249 (per-variant
TrueNAS-Core.pm/TrueNAS-Scale.pmdispatch) — explicitly out of scope for this release, tracked as possible v4.1/v5.0 work
[3.2.5] — 2026-08-23
Fixed
- HA-managed VMs on
truenas-multipathstorage could fail to start after installing or upgradingtruenas-proxmox-multipath— its postinst/postrm had the same gap #179 fixed in the main package: onlypvedaemon/pveproxywere restarted, neverpvestatd/pve-ha-lrm/pve-ha-crm. Verified live on pve01/02/03-hq — all five daemons now restart cleanly on install (#287)
Documentation
- README, getting-started.md, and the in-UI help panel updated for TrueNAS SCALE 25.04's UI changes (API key screen moved, standalone portal/initiator-group screen replaced by the iSCSI Share wizard) and to match the actual v3 storage panel fields, which had drifted from the v2.x field set still described in the docs (#286)
- deb822 (
.sources) format added as the primary apt install instructions for PVE 9 / Debian trixie, across README, getting-started.md, and upgrade-paths.md; the one-liner.listformat is kept as a fallback for PVE 8 / bookworm (#285)
[3.2.4] — 2026-08-01
Fixed
- HA-managed VMs on TrueNAS storage could fail to start after installing or upgrading the plugin —
postinst/postrmonly restartedpvedaemon/pveproxyand neverpve-ha-lrm/pve-ha-crm/pvestatd; all are now restarted on install/remove, with a regression test added (#179)
[3.2.3] — 2026-06-27
Documentation
- Documented the one-time apt codename prompt existing users see when upgrading past v3.2.2 (
apt update --allow-releaseinfo-change) - Added a SCALE 25.04 portal PUT port field callout (#280)
- Updated the bug report template to request
pveversion -voutput and ajournalctllog command
[3.2.2] — 2026-06-23
Fixed
api()bumped to 15 to match PVE 9's storage APIVER, silencing the "implementing an older storage API" warning seen on PVE 9
[3.2.1] — 2026-06-22
Added
- Apt dist codenames per major version:
limelight(v2),error(v3),rivendell(v4)
Fixed
- Codename alias directories weren't generated correctly, breaking
error/limelight/rivendellentries insources.list cp -roverwrite bug when creating thedists/errorcodename alias
[3.2.0] — 2026-06-20
Added
- Multipath iSCSI support, shipped as a separate, independently installable plugin —
truenas-proxmox-multipath/TrueNASMultipath.pm— distributed via its own apt component so it doesn't touch the base plugin (#256) - UI panel for the
truenas-multipathstorage type (#278)
Fixed
multipath.confnow managed safely via a taggedBEGIN/ENDblock; pre-existing unmanaged devices blocks are stripped before injecting the managed stanzaqemu_blockdev_optionsdelegated toPlugin.pmfor thehost_devicepath- Multipath
activate_volumeandnaafield lookup in_find_extent - Stale version accumulation in the apt pool/multipath/testing dists before publish
[3.1.0] — 2026-06-07
Added
- ZFS snapshot interface via the TrueNAS REST API (#234)
- GitHub Pages apt repository as the testing dist track; Cloudsmith testing track retired (#272)
- ADR-010: per-major-version apt dist tracks (supersedes ADR-003)
- ADR-011: apt components for optional feature packages
- Cloudsmith → GitHub Pages migration script and upgrade-paths documentation
Changed
api()bumped to 14 for PVE 9 compatibility- Stable v3+ releases no longer published to Cloudsmith
Fixed
parse_volnamenow accepts the state-volume naming pattern (#234)- Debian changelog added to both packages (#273)
- Testing dist channel name and broken README badges (#275)
Filename:prefix restored in CI apt Packages generation (#274)- gh-pages push now uses
GITHUB_TOKEN(previousACCESS_TOKENhad expired) - Apt arch warning in the Cloudsmith migration script
[3.0.0] — 2026-05-31
Added
- New
PVE::Storage::Custom::TrueNASPlugin— proper Proxmox VE custom storage type (no more ZFSPlugin.pm patching) - Standalone
truenas-plugin.jsUI panel — eliminates patching ofpvemanagerlib.js - Automatic rollback of TrueNAS API changes when operations partially fail (fixes dangling iSCSI extents)
- Bearer Token authentication as the primary auth method
- Per-host product name tracking (fixes behavior when multiple TrueNAS backends are configured)
- GitHub Pages apt repository as primary distribution channel
Changed
- Package no longer requires
gitorpatchat install time - Package no longer downloads from GitHub at install time (files embedded in
.deb) - Replaced
REST::ClientwithLWP::UserAgent(already present in Proxmox VE) - Renamed module internally from
FreeNAStoTrueNASnamespace - License changed from MIT to AGPL-3.0
Fixed
- Method validation regex in
freenas_api_callhad incorrect Perl operator precedence — validation never fired $runawaypreventwas a module global that could persist incorrectly across multiple connections- SSL certificate verification was disabled silently without logging a warning
eval $valuetemplate substitution replaced with explicit substitution map
Removed
stable-5/,stable-6/,stable-7/version-specific patch directories (superseded by new architecture)- Dependency on
librest-client-perl - Dependency on
git
[2.3.0] — 2024-01-07
Added
- Bearer Token authentication support (
truenas_token_authflag,truenas_secretfield) - TrueNAS SCALE version string parsing
Changed
- Renamed
freenas_passwordtotruenas_secretto represent either a password or token - Indentation and whitespace cleanup
[2.2.0] — 2023-08-16
Fixed
- Repository issues (#151, #152, #153)
- PayPal donation link
postinstWindows-style line ending issue (#149)
Changed
- Added
systemctl restart pvescheduler.serviceto post-install
[2.1.x] and Earlier
See the commit history for earlier changes.