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.

Bug 912210

Summary: Got python call trace when creating pscsi storage object in targetcli.
Product: Red Hat Enterprise Linux 6 Reporter: Gris Ge <fge>
Component: fcoe-target-utilsAssignee: Andy Grover <agrover>
Status: CLOSED ERRATA QA Contact: Bruno Goncalves <bgoncalv>
Severity: medium Docs Contact:
Priority: high    
Version: 6.4CC: bgoncalv
Target Milestone: rcKeywords: Regression, ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: python-rtslib-2.1.fb21-2.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 22:27:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 883516, 917478    

Description Gris Ge 2013-02-18 06:18:40 UTC
Description of problem:
=======
/> /backstores/pscsi create tmp_disk /dev/sdk 
Note: block backstore recommended for SCSI block devices
Traceback (most recent call last):                      
  File "/usr/lib/python2.6/site-packages/configshell/shell.py", line 990, in run_interactive                        
    self._cli_loop()                                                                                                
  File "/usr/lib/python2.6/site-packages/configshell/shell.py", line 813, in _cli_loop                              
    self.run_cmdline(cmdline)                                                                                       
  File "/usr/lib/python2.6/site-packages/configshell/shell.py", line 934, in run_cmdline                            
    self._execute_command(path, command, pparams, kparams)                                                          
  File "/usr/lib/python2.6/site-packages/configshell/shell.py", line 909, in _execute_command                       
    result = target.execute_command(command, pparams, kparams)                                                      
  File "/usr/lib/python2.6/site-packages/targetcli/ui_node.py", line 84, in execute_command
    pparams, kparams)
  File "/usr/lib/python2.6/site-packages/configshell/node.py", line 1405, in execute_command
    result = method(*pparams, **kparams)
  File "/usr/lib/python2.6/site-packages/targetcli/ui_backstore.py", line 185, in ui_command_create
    so = PSCSIStorageObject(name, dev)
  File "/usr/lib/python2.6/site-packages/rtslib/tcm.py", line 264, in __init__
    self._configure(dev)
  File "/usr/lib/python2.6/site-packages/rtslib/tcm.py", line 273, in _configure
    parent_hostid = self.backstore.index
AttributeError: 'PSCSIStorageObject' object has no attribute 'backstore'
=======

Version-Release number of selected component (if applicable):
fcoe-target-utils-2.0rc1.fb16-3.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. targetcli /backstores/pscsi create tmp_disk /dev/sdk 
2.
3.
  
Actual results:
python call trace

Expected results:
no python call trace

Additional info:

Does "pscsi" not support anymore? If so, please remove it warn user to use block storage object.

Comment 6 Andy Grover 2013-03-01 18:36:25 UTC
Note: bug is/was in python-rtslib pkg, which is used by targetcli.

Comment 9 Bruno Goncalves 2013-08-14 11:52:42 UTC
Verified on rpm -q python-rtslib
python-rtslib-2.1.fb21-3.el6_4.noarch


# targetcli /backstores/pscsi create tmp_disk /dev/sdb
Note: block backstore recommended for SCSI block devices
Created pscsi storage object tmp_disk using /dev/sdb


# targetcli ls
o- / ......................................................................................................................... [...]
  o- backstores .............................................................................................................. [...]
  | o- block .................................................................................................... [0 Storage Object]
  | o- fileio ................................................................................................... [0 Storage Object]
  | o- pscsi .................................................................................................... [1 Storage Object]
  |   o- tmp_disk ........................................................................................... [/dev/sdb deactivated]
  o- loopback .......................................................................................................... [0 Targets]



targetcli saveconfig
Configuration saved to /etc/target/saveconfig.json

# service fcoe-target restart
   Deactivating FCoE Target... done
   Unloading FCoE Target modules... done
   Unmounting configfs... done
[  OK  ]
Starting FCoE Target: 
   Loading modules... done
   Mounting configfs... done
   Applying saved config... done
[  OK  ]

# targetcli ls
o- / ......................................................................................................................... [...]
  o- backstores .............................................................................................................. [...]
  | o- block .................................................................................................... [0 Storage Object]
  | o- fileio ................................................................................................... [0 Storage Object]
  | o- pscsi .................................................................................................... [1 Storage Object]
  |   o- tmp_disk ........................................................................................... [/dev/sdb deactivated]
  o- loopback .......................................................................................................... [0 Targets]

Comment 10 errata-xmlrpc 2013-11-21 22:27:19 UTC
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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1683.html