-
Bug
-
Resolution: Done-Errata
-
Major
-
rhel-10.0
-
python-rtslib-2.1.76-12.el10
-
Yes
-
Important
-
rhel-storage-io-2
-
ssg_filesystems_storage_and_HA
-
10
-
13
-
2
-
QE ack, Dev ack
-
False
-
False
-
-
None
-
None
-
Pass
-
Automated
-
None
What were you trying to do that didn't work
sg_persist/mpathpersist cmd cannot be successfully for iscsi lun disk.
What is the impact of this issue to you?
We can't use this command to test sd/sg disk persistent reservation in libvirt guest.
Please provide the package NVR for which the bug is seen:
python3-rtslib-2.1.76-8.el10.noarch
targetcli-2.1.58-2.el10.noarch
kernel-6.11.0-25.el10.x86_64
How reproducible is this bug?:
100%
Steps to reproduce
1. Prepare iscsi lun by targetcli.
# cat targetcli.sh dd if=/dev/zero of=/var/tmp/emulated-iscsi count=1024 bs=1024K targetcli /backstores/fileio/ create device.emulated-iscsi /var/tmp/emulated-iscsi targetcli /iscsi/ create iqn.2024-10.com.virtemulated:emulated-iscsi-1.target targetcli /iscsi/iqn.2024-10.com.virtemulated:emulated-iscsi-1.target/tpg1/luns/ create /backstores/fileio/device.emulated-iscsi targetcli /iscsi/iqn.2024-10.com.virtemulated:emulated-iscsi-1.target/tpg1/acls/ create iqn.1994-05.com.redhat:1e2aecaec16c targetcli /iscsi/ create iqn.2024-10.com.virtemulated:emulated-iscsi-2.target targetcli /iscsi/iqn.2024-10.com.virtemulated:emulated-iscsi-2.target/tpg1/luns/ create /backstores/fileio/device.emulated-iscsi targetcli /iscsi/iqn.2024-10.com.virtemulated:emulated-iscsi-2.target/tpg1/acls/ create iqn.1994-05.com.redhat:1e2aecaec16c targetcli /iscsi/iqn.2024-10.com.virtemulated:emulated-iscsi-1.target/tpg1/ set attribute authentication=0 demo_mode_write_protect=0 generate_node_acls=1 cache_dynamic_acls=1 targetcli /iscsi/iqn.2024-10.com.virtemulated:emulated-iscsi-2.target/tpg1/ set attribute authentication=0 demo_mode_write_protect=0 generate_node_acls=1 cache_dynamic_acls=1 targetcli / saveconfig iscsiadm -m discovery -t sendtargets -p 127.0.0.1
2. Login the iscsi lun and check the iscsi disk.
# iscsiadm -m node -T iqn.2024-10.com.virtemulated:emulated-iscsi-1.target -p 127.0.0.1 -l # iscsiadm -m node -T iqn.2024-10.com.virtemulated:emulated-iscsi-2.target -p 127.0.0.1 -l # lsscsi [0:2:0:0] disk DELL PERC H745 Frnt 5.14 /dev/sda [1:0:0:0] disk LIO-ORG device.emulated 4.0 /dev/sdb [2:0:0:0] disk LIO-ORG device.emulated 4.0 /dev/sdc
3. Run following sg_persist command to register key.
# sg_persist --out --register-ignore --param-sark 123aaa /dev/sdb -v
inquiry cdb: [12 00 00 00 24 00]
LIO-ORG device.emulated 4.0
Peripheral device type: disk
Persistent reservation out cdb: [5f 06 00 00 00 00 00 00 18 00]
Persistent reservation out:
Fixed format, current; Sense key: Not Ready
Additional sense: Logical unit communication failure
PR out (Register and ignore existing key): Sense category: 2
Expected results
# sg_persist --out --register-ignore --param-sark 123aaa /dev/sdb -v
inquiry cdb: [12 00 00 00 24 00]
LIO-ORG device.emulated 4.0
Peripheral device type: disk
Persistent reservation out cdb: [5f 06 00 00 00 00 00 00 18 00]
PR out: command (Register and ignore existing key) successful
Actual results
Failed to run sg_persist command
Additional info:
1) Passed in RHEL9.5 with python3-rtslib-2.1.76-1.el9.noarch and kernel-5.14.0-452.el9.x86_64 and targetcli-2.1.57-2.el9.noarch.
2) Found a previous related bug 1658988 : passed with creating /etc/target/pr according to the comment. But according to bug 1658988#c24 , the /var/target/pr exists:
# ll /var/target/
total 0
drwxr-xr-x. 2 root root 6 Jun 23 20:00 alua
drwxr-xr-x. 2 root root 6 Jun 23 20:00 pr
- links to
-
RHBA-2024:142278 python-rtslib update