Fix
#140 — IPv6 iSCSI portals. A portal written as [fd00::1]:3260 was normalised to fd00::1:3260, probed with the IPv4-only IO::Socket::INET (always "not reachable") and matched against iscsiadm session lines by substring, so an IPv6 portal could not be used at all. Portals are now parsed once into host and port, kept bracketed for every iscsiadm -p argument, probed with IO::Socket::IP (both address families), and matched against sessions and node records by parsed value, so equivalent IPv6 spellings (2001:db8:0:0::1 vs 2001:db8::1) count as the same portal. IPv4 and hostname portals behave as before, including the FQDN-to-IPv4 session match from #102 and the longer-IQN guard from #124. path() now renders the synthesised by-path name the way udev spells an IPv6 portal (ip-fd42::70:3260-iscsi-..., no brackets).
Log into configured iSCSI portals only. After SendTargets discovery, open-iscsi holds a node record for every address the target advertises, and a TrueNAS portal bound to 0.0.0.0 or :: advertises every address on the box (docker and VM bridges, link-local and public IPv6). The plugin logged into all of them, and each unreachable address blocked for open-iscsi's whole login retry budget (about two minutes), serially, on the first login and on every reconnect after a session drop. The login loop now uses the portals listed in tn_discovery_portal and tn_portals only, logs the skipped discovered portals once, and keeps the direct fallback login for configured portals missing from the node list (#91).
Behaviour change
A host that configured only tn_discovery_portal against a TrueNAS with several reachable storage interfaces used to get a session on each of them implicitly. It now gets one, and a warning in the journal names the portals that were skipped. List the extra portals in tn_portals to keep the additional paths.
Validation
Live from Proxmox VE 9 to TrueNAS 28.0 MASTER, released plugin (2.1.24~beta6) vs this build, portal bound to 0.0.0.0 advertising 8 addresses (7 unreachable):
| Step | before | after |
|---|---|---|
| first login + alloc | 858 s | 3-5 s |
| reconnect after session drop | 856 s | 1-2 s |
boot-style --loginall=automatic
| 122 s | 0 s |
Same usable sessions in every case; only the configured portals' node records are marked startup=automatic now.
Scenarios run end to end (discovery, login, alloc, activate, path(), block device, logout, reconnect, boot-style login, free): plain, CHAP, hostname portal, portless portal, multipath (two IPv4 portals), multipath + CHAP, IPv6 (ULA), IPv6 + CHAP, IPv6 + IPv4 mixed, IPv4 regression.
Unit suites t/ipv6 (31), t/login (12), t/scram (48) and t/nvme pass with the same results as beta7 (the one pre-existing t/nvme/06 failure is unchanged). t/rate-limit and t/import-snapshots need a live broker / PVE::LXC and fail identically on beta7.
Install
apt install ./truenas-proxmox-plugin_2.1.24.beta8_all.deb
SHA256SUMS lists the file as truenas-proxmox-plugin_2.1.24~beta8_all.deb; GitHub renames ~ to . in asset names, so rename the download back (or compare the hash by hand) before sha256sum -c SHA256SUMS.
Full Changelog: v2.1.24-beta7...v2.1.24-beta8