Bug 892764

Summary: [ORIGIN] Mcollective plugin disconnects from Stomp after each call [Was: Broker code on F17 does not work with latest version of stomp (1.2.8)]
Product: OKD Reporter: Krishna Raman <kraman>
Component: PodAssignee: Krishna Raman <kraman>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.xCC: bleanhar, dmcphers, laurent, mfisher, pruan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 995492 (view as bug list) Environment:
Last Closed: 2013-04-02 14:45:42 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: 995492    

Description Krishna Raman 2013-01-07 19:03:13 UTC
Description of problem:
Broker code on F17 does not work with latest version of stomp (1.2.8)

Version-Release number of selected component (if applicable):
Fedora 17, Stomp 1.2.8, Ruby 1.9

How reproducible:
Always

Steps to Reproduce:
1. Configure m-collective plugin to use stomp 1.2.8
2. Restart broker
3. Perform any mcollective api call to get results from node
  
Actual results:
No existing connection error

Expected results:
API call succeeds

Additional info:
Code works with Stomp 1.2.2

Comment 1 Krishna Raman 2013-01-08 00:55:08 UTC
Traced this some more and the reason its failing is because we are disconnecting the stomp connection after a call is made to the node.

Before patch https://github.com/puppetlabs/marionette-collective/pull/56, the connection was never re-established and any calls made after the initial disconnect would fail.

I have asked Troy to patch and provide a version of the F18 mcollective 2.2 RPM on the mirror site and this seems to have fixed the problem.

Comment 2 Laurent Eschenauer 2013-02-08 14:34:51 UTC
I have a similar problem with the openshift origin broker on CentOS 6.3. On every request, I receive a "no current connection exists" error (full stack trace below).

I've just checked, and the openshift infrastructure repo still contains the mcollective-client 2.0 and not 2.2. Could this be the issue ?

Ruby 1.8.7
Stomp 1.2.2
openshift-origin-broker-1.0.1

Installed following the 'build your own paas' tutorial.


Snipet from development.log:

Started GET "/broker/rest/cartridges" for 192.168.100.8 at Thu Feb 07 21:11:59 +0000 2013
  Processing by CartridgesController#index as JSON
Completed 500 Internal Server Error in 7ms

Stomp::Error::NoCurrentConnection (no current connection exists):
  

Rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.13/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.3ms)
Rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.13/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (3.3ms)
Rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.13/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (7.1ms)

Comment 3 Krishna Raman 2013-02-08 14:45:37 UTC
Yes, that is the exact symptom of this issue. If you apply the changes mentioned in the mcollective patch in comment #1, you should be able to work around it.

(In reply to comment #2)
> I have a similar problem with the openshift origin broker on CentOS 6.3. On
> every request, I receive a "no current connection exists" error (full stack
> trace below).
> 
> I've just checked, and the openshift infrastructure repo still contains the
> mcollective-client 2.0 and not 2.2. Could this be the issue ?
> 
> Ruby 1.8.7
> Stomp 1.2.2
> openshift-origin-broker-1.0.1
> 
> Installed following the 'build your own paas' tutorial.
> 
> 
> Snipet from development.log:
> 
> Started GET "/broker/rest/cartridges" for 192.168.100.8 at Thu Feb 07
> 21:11:59 +0000 2013
>   Processing by CartridgesController#index as JSON
> Completed 500 Internal Server Error in 7ms
> 
> Stomp::Error::NoCurrentConnection (no current connection exists):
>   
> 
> Rendered
> /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.13/lib/action_dispatch/middleware/
> templates/rescues/_trace.erb (1.3ms)
> Rendered
> /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.13/lib/action_dispatch/middleware/
> templates/rescues/_request_and_response.erb (3.3ms)
> Rendered
> /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.13/lib/action_dispatch/middleware/
> templates/rescues/diagnostics.erb within rescues/layout (7.1ms)

Comment 4 Laurent Eschenauer 2013-02-08 14:59:57 UTC
Thank you, I've applied the patch and it fixes the problem.

Note that I've tried to install mcollective 2.2 from the puppetlabs repo, and this causes other errors in the broker.

(In reply to comment #3)
> Yes, that is the exact symptom of this issue. If you apply the changes
> mentioned in the mcollective patch in comment #1, you should be able to work
> around it.
> 
> (In reply to comment #2)
> > I have a similar problem with the openshift origin broker on CentOS 6.3. On
> > every request, I receive a "no current connection exists" error (full stack
> > trace below).
> > 
> > I've just checked, and the openshift infrastructure repo still contains the
> > mcollective-client 2.0 and not 2.2. Could this be the issue ?
> > 
> > Ruby 1.8.7
> > Stomp 1.2.2
> > openshift-origin-broker-1.0.1
> > 
> > Installed following the 'build your own paas' tutorial.
> > 
> > 
> > Snipet from development.log:
> > 
> > Started GET "/broker/rest/cartridges" for 192.168.100.8 at Thu Feb 07
> > 21:11:59 +0000 2013
> >   Processing by CartridgesController#index as JSON
> > Completed 500 Internal Server Error in 7ms
> > 
> > Stomp::Error::NoCurrentConnection (no current connection exists):
> >   
> > 
> > Rendered
> > /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.13/lib/action_dispatch/middleware/
> > templates/rescues/_trace.erb (1.3ms)
> > Rendered
> > /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.13/lib/action_dispatch/middleware/
> > templates/rescues/_request_and_response.erb (3.3ms)
> > Rendered
> > /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.13/lib/action_dispatch/middleware/
> > templates/rescues/diagnostics.erb within rescues/layout (7.1ms)

Comment 5 Krishna Raman 2013-03-22 20:20:06 UTC
Fixed by providing custom build of m-collective with patch applied.

Comment 6 Peter Ruan 2013-03-26 19:41:35 UTC
verified with the latest origin build.  I don't see this error anymore.