Bug 752699

Summary: Warn use to start daemon "fcoe-target" when execute targetadmin
Product: Red Hat Enterprise Linux 6 Reporter: Gris Ge <fge>
Component: fcoe-target-utilsAssignee: Andy Grover <agrover>
Status: CLOSED ERRATA QA Contact: Gris Ge <fge>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2CC: czhang
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 13:50:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 767187    

Description Gris Ge 2011-11-10 07:13:48 UTC
Description of problem:

Without fcoe-target daemon (actually is without target_core_mod kernel module), targetadmin will got error like this:
===============
Traceback (most recent call last):
  File "/usr/bin/targetadmin", line 79, in <module>
    main()
  File "/usr/bin/targetadmin", line 72, in main
    root_node.refresh()
  File "/usr/lib/python2.6/site-packages/rtsadmin/ui_root.py", line 46, in refresh
    UIBackstores(self)
  File "/usr/lib/python2.6/site-packages/rtsadmin/ui_backstore.py", line 50, in __init__
    self.refresh()
  File "/usr/lib/python2.6/site-packages/rtsadmin/ui_backstore.py", line 54, in refresh
    UIPSCSIBackstore(self)
  File "/usr/lib/python2.6/site-packages/rtsadmin/ui_backstore.py", line 181, in __init__
    UIBackstore.__init__(self, 'pscsi', parent)
  File "/usr/lib/python2.6/site-packages/rtsadmin/ui_backstore.py", line 67, in __init__
    self.refresh()
  File "/usr/lib/python2.6/site-packages/rtsadmin/ui_backstore.py", line 71, in refresh
    for so in RTSRoot().storage_objects:
  File "/usr/lib/python2.6/site-packages/rtslib/root.py", line 67, in __init__
    self._create_in_cfs_ine('any')
  File "/usr/lib/python2.6/site-packages/rtslib/node.py", line 71, in _create_in_cfs_ine
    os.mkdir(self.path)
OSError: [Errno 2] No such file or directory: '/sys/kernel/config/target'
===============

It's kind of confusing. Please change your python code to indicate user for kernel module or start daemon automatically like iscsi-initiator-utils.

Version-Release number of selected component (if applicable):
fcoe-target-utils-1.99.1.git37f175c-6.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install fcoe-target-utils
2. execute targetadm before start fcoe-target daemon
3.
  
Actual results:
python call trace

Expected results:
better error message.

Additional info:

Comment 4 Gris Ge 2012-05-22 06:15:24 UTC
When execute command targetcli without daemon started, will got correct warning:
===
Kernel modules not loaded yet, start the fcoe-target service.
===

fcoe-target-utils-2.0rc1.fb10-5.el6.noarch

VERIFY

Comment 6 errata-xmlrpc 2012-06-20 13:50:46 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-2012-0854.html