Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
python3-rtslib is patched (0002-default_dbroot.patch) so that it prefers a dbroot /var/target instead of /etc/target. This means it no longer matches the preferred dbroot in the kernel.
Generally this isn't important. We've been using target.service to set up an iSCSI target, it sets the dbroot to /var/target and works fine.
However on one system, it looks like another target driver is already registered. I don't have physical access to the machine in question but I suspect it is a Mellanox Connect-X 5 NIC (via the mlx5_ib module). ib_isert and ib_srpt are additionally listed here:
$ ls -l /sys/module/target_core_mod/holders
total 0
lrwxrwxrwx 1 root root 0 Aug 19 00:17 ib_isert -> ../../ib_isert
lrwxrwxrwx 1 root root 0 Aug 19 00:17 ib_srpt -> ../../ib_srpt
lrwxrwxrwx 1 root root 0 Aug 19 00:17 iscsi_target_mod -> ../../iscsi_target_mod
lrwxrwxrwx 1 root root 0 Aug 19 00:17 target_core_file -> ../../target_core_file
lrwxrwxrwx 1 root root 0 Aug 19 00:17 target_core_iblock -> ../../target_core_iblock
lrwxrwxrwx 1 root root 0 Aug 19 00:17 target_core_pscsi -> ../../target_core_pscsi
lrwxrwxrwx 1 root root 0 Aug 19 00:17 target_core_user -> ../../target_core_user
The result is that all my targetcli commands (eg "targetcli sessions"), and the target.service journal, show the warning text:
/usr/lib/python3.6/site-packages/rtslib_fb/root.py:175: UserWarning: Cannot set dbroot to /var/target. Target drivers have already been registered.
.format(self._default_dbroot))
Would it make sense for RHEL to follow the upstream convention, remove the patch, and just prefer /etc/target?
Version-Release number of selected component (if applicable):
python3-rtslib-2.1.73-2.el8.noarch
kernel-4.18.0-240.22.1.el8_3.x86_64
(Note: I an using CentOS 8.3, but I can see the patch is still in the 2.1.74-1.el8 version of this package)
How reproducible:
100%
Steps to Reproduce:
Here's a way to repduce without installing a Mellanox NIC.
1. On a system that is otherwise not configured for iSCSI/targetcli, run "modprobe ib_srpt"
2. Run "cat /sys/kernel/config/target/dbroot"
3. Run any targetcli command. Eg: "targetcli exit"
Actual results:
$ cat /sys/kernel/config/target/dbroot
/etc/target
$ targetcli exit
/usr/lib/python3.6/site-packages/rtslib_fb/root.py:175: UserWarning: Cannot set dbroot to /var/target. Target drivers have already been registered.
.format(self._default_dbroot))
Expected results:
As above, but without the Python warning.
Or as above, but using /var/target and without the Python warning.
Additional info:
Running any targetcli command before loading ib_srpt is a workaround - in that the dbroot=/var/target setting sticks and targetcli does not report the warning text.
This modprobe.conf entry seems to work for me:
install ib_srpt /usr/bin/targetcli exit; /sbin/modprobe --ignore-install ib_srpt
(In reply to Darrin Smart from comment #0)
> This modprobe.conf entry seems to work for me:
>
> install ib_srpt /usr/bin/targetcli exit; /sbin/modprobe --ignore-install
> ib_srpt
This is probably better.
install target_core_mod /sbin/modprobe --ignore-install target_core_mod; echo /var/target > /sys/kernel/config/target/dbroot
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (python-rtslib bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHEA-2022:7756