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.
Bug 889205 - targetcli: Fails after creating block backstore
Summary: targetcli: Fails after creating block backstore
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-rtslib
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Andy Grover
QA Contact: Bruno Goncalves
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-20 13:54 UTC by Bruno Goncalves
Modified: 2023-03-08 07:25 UTC (History)
0 users

Fixed In Version: python-rtslib-2.1.fb26-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-08 17:27:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Bruno Goncalves 2012-12-20 13:54:00 UTC
Description of problem:
All targetcli commands after creating a block backstores fails, with the exception of clearconfig.

Version-Release number of selected component (if applicable):
rpm -q targetcli
targetcli-2.0rc1.fb17-1.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1.modprobe scsi_debug
2. targetcli /backstores/block create target1-lun1 /dev/sdj
Created block storage object target1-lun1 using /dev/sdj.
3.targetcli ls
Traceback (most recent call last):
  File "/usr/bin/targetcli", line 87, in <module>
    main()
  File "/usr/bin/targetcli", line 70, in main
    shell.run_cmdline(" ".join(sys.argv[1:]))
  File "/usr/lib/python2.7/site-packages/configshell/shell.py", line 934, in run_cmdline
    self._execute_command(path, command, pparams, kparams)
  File "/usr/lib/python2.7/site-packages/configshell/shell.py", line 909, in _execute_command
    result = target.execute_command(command, pparams, kparams)
  File "/usr/lib/python2.7/site-packages/targetcli/ui_node.py", line 84, in execute_command
    pparams, kparams)
  File "/usr/lib/python2.7/site-packages/configshell/node.py", line 1405, in execute_command
    result = method(*pparams, **kparams)
  File "/usr/lib/python2.7/site-packages/configshell/node.py", line 714, in ui_command_ls
    tree = self._render_tree(target, depth=depth)
  File "/usr/lib/python2.7/site-packages/configshell/node.py", line 857, in _render_tree
    + self._render_tree(children[i], margin, depth)
  File "/usr/lib/python2.7/site-packages/configshell/node.py", line 857, in _render_tree
    + self._render_tree(children[i], margin, depth)
  File "/usr/lib/python2.7/site-packages/configshell/node.py", line 857, in _render_tree
    + self._render_tree(children[i], margin, depth)
  File "/usr/lib/python2.7/site-packages/configshell/node.py", line 769, in _render_tree
    (description, is_healthy) = root.summary()
  File "/usr/lib/python2.7/site-packages/targetcli/ui_backstore.py", line 400, in summary
    if so.readonly:
  File "/usr/lib/python2.7/site-packages/rtslib/tcm.py", line 675, in _get_readonly
    return bool(int(self._parse_info('readonly')))
  File "/usr/lib/python2.7/site-packages/rtslib/tcm.py", line 130, in _parse_info
    % key, ' '.join(info.split())).group(1).lower()
AttributeError: 'NoneType' object has no attribute 'group'

4. targetcli clearconfig True
All configuration cleared

Comment 1 Andy Grover 2012-12-20 22:13:53 UTC
This is a kernel/rtslib incompatibility. Using kernel >= 3.6 or rtslib >= 2.1.fb26 will resolve it. I think rhel7 is still pulling updates from Fedora, and should therefore get this fix automatically?

Comment 2 Bruno Goncalves 2012-12-21 09:48:23 UTC
I have updated the lib to rtslib >= 2.1.fb26.

It seems to have solved the problem, although new one appeared

targetcli /iscsi/iqn.2009-10.com.redhat:storage-1/tpg1/portals create 0.0.0.0
Traceback (most recent call last):
  File "/usr/bin/targetcli", line 87, in <module>
    main()
  File "/usr/bin/targetcli", line 70, in main
    shell.run_cmdline(" ".join(sys.argv[1:]))
  File "/usr/lib/python2.7/site-packages/configshell/shell.py", line 934, in run_cmdline
    self._execute_command(path, command, pparams, kparams)
  File "/usr/lib/python2.7/site-packages/configshell/shell.py", line 909, in _execute_command
    result = target.execute_command(command, pparams, kparams)
  File "/usr/lib/python2.7/site-packages/targetcli/ui_node.py", line 84, in execute_command
    pparams, kparams)
  File "/usr/lib/python2.7/site-packages/configshell/node.py", line 1405, in execute_command
    result = method(*pparams, **kparams)
  File "/usr/lib/python2.7/site-packages/targetcli/ui_target.py", line 977, in ui_command_create
    if ip_address not in utils.list_eth_ips() and ip_address != "0.0.0.0":
AttributeError: 'module' object has no attribute 'list_eth_ips'

Comment 3 Andy Grover 2012-12-21 16:53:49 UTC
please upgrade targetcli to fb18 and that will be resolved.

Comment 4 Andy Grover 2013-01-08 00:06:46 UTC
Still any issues here or can we close this bz? thx.

Comment 5 Bruno Goncalves 2013-01-08 11:29:56 UTC
It seems to be working fine with the latest updates:

rpm -q python-rtslib
python-rtslib-2.1.fb28-1.el7.noarch

rpm -q targetcli
targetcli-2.0rc1.fb19-1.el7.noarch


Note You need to log in before you can comment on or make changes to this bug.