LIO RTSLIBFB Crashes on Modern Kernels

Bug #2055864 reported by Boris Lukashev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
New
Undecided
Unassigned

Bug Description

Attempting to use targetcli with 2023.1 in a 22.04 container on newer kernels results in:
```
/backstores/block> delete iqn.2010-10.org.openstack:volume-...
Traceback (most recent call last):
  File "/usr/bin/targetcli", line 329, in <module>
    main()
  File "/usr/bin/targetcli", line 317, in main
    shell.run_interactive()
  File "/usr/lib/python3/dist-packages/configshell_fb/shell.py", line 900, in run_interactive
    self._cli_loop()
  File "/usr/lib/python3/dist-packages/configshell_fb/shell.py", line 729, in _cli_loop
    self.run_cmdline(cmdline)
  File "/usr/lib/python3/dist-packages/configshell_fb/shell.py", line 843, in run_cmdline
    self._execute_command(path, command, pparams, kparams)
  File "/usr/lib/python3/dist-packages/configshell_fb/shell.py", line 818, in _execute_command
    result = target.execute_command(command, pparams, kparams)
  File "/usr/lib/python3/dist-packages/configshell_fb/node.py", line 1406, in execute_command
    return method(*pparams, **kparams)
  File "/usr/lib/python3/dist-packages/targetcli/ui_backstore.py", line 309, in ui_command_delete
    child.rtsnode.delete(save=save)
  File "/usr/lib/python3/dist-packages/rtslib_fb/tcm.py", line 269, in delete
    for lun in self._gen_attached_luns():
  File "/usr/lib/python3/dist-packages/rtslib_fb/tcm.py", line 215, in _gen_attached_luns
    for tpgt_dir in listdir(tpgts_base):
NotADirectoryError: [Errno 20] Not a directory: '/sys/kernel/config/target/iscsi/cpus_allowed_list'
```
Using iSCSI volumes on the control plane side of things throws:
```
Build of instance f03a94eb-8a93-4073-807a-f158dad320e0 aborted: Unable to update attachment.(Bad or unexpected response from the storage volume backend API: Create export for volume failed (Resource could not be found.).). (HTTP 500)
```

Which is remedied by installing the current version of rtslib_fb into /usr/lib/python3/dist-packages/rtslib_fb. Cinder containers need to pull the current library from pip it appears to avoid crashing in the back-end during volume ops. Front-end error

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.