Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 1503644

Summary: rbd-target-gw fails to start
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Lubos Trilety <ltrilety>
Component: iSCSIAssignee: Mike Christie <mchristi>
Status: CLOSED NOTABUG QA Contact: Tejas <tchandra>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.0CC: anharris, ceph-eng-bugs, ceph-qe-bugs
Target Milestone: rcKeywords: Reopened
Target Release: 3.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-07 08:45:26 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:

Description Lubos Trilety 2017-10-18 14:11:06 UTC
Description of problem:
rbd-target-gw service on machine installed by ceph-ansible fails to start with following error:

Removing iSCSI target from LIO
Removing iSCSI target from LIO
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/bin/rbd-target-gw", line 33, in exception_handler
clearconfig()
File "/usr/bin/rbd-target-gw", line 82, in clearconfig
gw.drop_target(local_gw)
File "/usr/lib/python2.7/site-packages/ceph_iscsi_config/lio.py", line 58, in drop_target
if this_host in self.config.config['gateways']:
AttributeError: 'Config' object has no attribute 'config'
Original exception was:
Traceback (most recent call last):
File "/usr/bin/rbd-target-gw", line 462, in <module>
halt("Unable to open/read the configuration object")
File "/usr/bin/rbd-target-gw", line 210, in halt
clearconfig()
File "/usr/bin/rbd-target-gw", line 82, in clearconfig
gw.drop_target(local_gw)
File "/usr/lib/python2.7/site-packages/ceph_iscsi_config/lio.py", line 58, in drop_target
if this_host in self.config.config['gateways']:
AttributeError: 'Config' object has no attribute 'config'



Version-Release number of selected component (if applicable):
ceph-iscsi-config-2.3-11.el7cp.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install ceph with iSCSI gateway using ceph-ansible
2.
3.

Actual results:
rbd-target-gw fails to start

Expected results:
rbd-target-gw runs correctly

Additional info:
Changing the line in /usr/lib/python2.7/site-packages/ceph_iscsi_config/lio.py from:

iqn = self.config.config['gateways'][this_host]['iqn']

to:

iqn = self.config['gateways'][this_host]['iqn']

fixed the issue.

Comment 3 Lubos Trilety 2017-11-07 08:45:26 UTC
While the service actually does not run after ansible deployment, and even the error's present, it could be run manually without any issue. Guide states it has to be run manually, so it's probably fine. Hence closing this Bug.