Bug 1390022

Summary: [ceph-iscsi-config] rbd-target-gw crash if the running host is not defined to the active configuration
Product: Red Hat Storage Console Reporter: Paul Cuzner <pcuzner>
Component: ceph-ansibleAssignee: Paul Cuzner <pcuzner>
Status: CLOSED ERRATA QA Contact: Tejas <tchandra>
Severity: high Docs Contact:
Priority: high    
Version: 2CC: adeza, aschoen, ceph-eng-bugs, ceph-qe-bugs, gmeno, jdillama, kdreyer, kurs, nthomas, pcuzner, sankarshan, tchandra
Target Milestone: ---   
Target Release: 2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-iscsi-config-1.5-1.el7cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-22 23:42:25 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:

Description Paul Cuzner 2016-10-30 22:41:02 UTC
Description of problem:
If the rbd-target-gw service is started BEFORE the host is registered to the configuration object, the service fails with a python backtrace.

Version-Release number of selected component (if applicable):


How reproducible:
Every time

Steps to Reproduce:
1. start the rbd-target-gw service before configuratin OR
   create a one node configuration then try and start the service on node 2
2.
3.

Actual results:
backtrace and rbd-target-gw service fails

Expected results:
Service should check whether there is any work to do, and message accordingly

Additional info:

Comment 3 Paul Cuzner 2016-11-02 04:37:23 UTC
Please test against 1.5test release

Comment 4 Tejas 2016-11-02 14:25:10 UTC
Paul, 

  Had a question here. Should'nt  the rbd-target-gw service be masked when the gateway is configured on the node?

the steps I tried:
1. started the rbd-target-gw service on a node which does not have the gateway configured.
2. configred the iscsi gateway on that node.
3. I am still able to manipulate the rbd-target-gw service.

Let me know if I have misunderstood this.

Thanks,
Tejas

Comment 6 Jason Dillaman 2016-11-02 16:03:20 UTC
What is the impact of this issue? Is this the admin starting the service before they add the node the playbook and re-run ansible? If so, that seems like this could be documented and fixed in the next release.

Comment 7 Paul Cuzner 2016-11-03 23:23:53 UTC
Issue is resolved with 1.5 released to QE today (fri 04 nov)

Crash is exactly that - admin starts the service, prior to any playbook run. Rather than let the daemon fail and cause confusion, the code now checks if there is anything to do, no work = no-op.

Comment 8 Paul Cuzner 2016-11-03 23:26:36 UTC
(In reply to Tejas from comment #4)
> Paul, 
> 
>   Had a question here. Should'nt  the rbd-target-gw service be masked when
> the gateway is configured on the node?
> 
> the steps I tried:
> 1. started the rbd-target-gw service on a node which does not have the
> gateway configured.
> 2. configred the iscsi gateway on that node.
> 3. I am still able to manipulate the rbd-target-gw service.
> 
> Let me know if I have misunderstood this.
> 
> Thanks,
> Tejas

rbd-target-gw replaces the target service - so it needs to be present and active on all nodes. It is responsible for rebuilding the iscsi configuration following a reboot, by reading and applying the current configuration object.

if you start the rbd-target-gw on a gateway that is not yet configured, the daemon should not crash.

please retest this scenario on the 1.5 downstream release.

Comment 12 Tejas 2016-11-04 17:13:06 UTC
Verified in build:
ceph-iscsi-config-1.5-1.el7cp
No crash seen.

Comment 14 errata-xmlrpc 2016-11-22 23:42:25 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.

https://access.redhat.com/errata/RHBA-2016:2817