freenas-proxmox/perl5
Kevin Adams 96957c037f fix: SCALE 25.04 compatibility — integer types and alias uniqueness (#264)
TrueNAS SCALE 25.04 introduced two breaking changes in its iSCSI API:

1. Unique alias constraint: POST /iscsi/target with alias collides on retry.
   Remove alias field entirely — names are already unique per-VM.

2. Pydantic v2 strict integer validation: rejects JSON strings ("7") where
   integers are expected. Perl scalars become dual-vars (string+int flags)
   after log interpolation or hash-key lookups, causing encode_json to emit
   quoted values. Fix: int() at all integer-ID pass sites (portal, target,
   extent, lun) and omit null initiator/auth instead of sending explicit null.

Confirmed: alloc_image works on SCALE 25.04, SCALE 24.10, and CORE 13.0-U6.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-26 23:01:25 -04:00
..
PVE/Storage/Custom fix: SCALE 25.04 compatibility — integer types and alias uniqueness (#264) 2026-05-26 23:01:25 -04:00