Package: targetcli-fb
Version: 1:2.1.53-1.2
Severity: important
Tags: upstream
Dear Maintainer,
when Node ACLs and pre-existing LUNs are present, then creation of a
new LUN will lead to a Python exception:
type object 'MappedLUN' has no attribute 'MAX_LUN'
and non-zero exit status.
Steps to reproduce the issue:
# targetcli /iscsi create
Created target iqn.2003-01.org.linux-iscsi.dev9.x8664:sn.e4440d89a838.
Created TPG 1.
Global pref auto_add_default_portal=true
Created default portal listening on all IPs (0.0.0.0), port 3260.
# ./targetcli-repro.sh iqn.2003-01.org.linux-iscsi.dev9.x8664:sn.e4440d89a838
tpg1
Created fileio file0 with size 1048576
/tmp/disk1.img exists, using its size (209715200 bytes) instead
Created fileio file1 with size 209715200
Created Node ACL for iqn.1993-08.org.debian:01:00000000000
Created LUN 0.
Created LUN 0->0 mapping in node ACL iqn.1993-08.org.debian:01:00000000000
Created LUN 1.
type object 'MappedLUN' has no attribute 'MAX_LUN'
# cat targetcli-repro.sh
#!/usr/bin/bash
targetcli /backstores/fileio create file0 /tmp/disk0.img 1M
targetcli /backstores/fileio create file1 /tmp/disk1.img 1M
targetcli /iscsi/$1/$2/acls/ create iqn.1993-08.org.debian:01:00000000000
targetcli /iscsi/$1/$2/luns create /backstores/fileio/file0
targetcli /iscsi/$1/$2/luns create /backstores/fileio/file1
While the LUN is created successfully, the mapped LUN for each ACL is
not. Since this is a very common use-case, I went with severity
'important', hope that is okay.
Picking up commits db153aa ("target: remove the reference to MAX_LUN")
and 23f2e2f ("Fix mapping the new LUN to the node ACL") from upstream
fixes the issue.
Best Regards,
Fiona
-- System Information:
Debian Release: 13.0
APT prefers testing-security
APT policy: (500, 'testing-security'), (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.14.8-2-pve (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages targetcli-fb depends on:
ii python3 3.13.5-1
ii python3-configshell-fb 1:2.0.0-2
ii python3-gi 3.50.0-4+b1
ii python3-rtslib-fb 2.1.76-3
ii python3-six 1.17.0-1
targetcli-fb recommends no packages.
targetcli-fb suggests no packages.
-- no debconf information