Bug 1200473

Summary: MongoDB - Fix bug with reconnection to new master node
Product: Red Hat OpenStack Reporter: Eoghan Glynn <eglynn>
Component: openstack-ceilometerAssignee: Chris Dent <chdent>
Status: CLOSED ERRATA QA Contact: Yurii Prokulevych <yprokule>
Severity: high Docs Contact:
Priority: high    
Version: 6.0 (Juno)CC: ajeain, dnavale, eglynn, jruzicka, pbrady, rrosa, yeylon
Target Milestone: z3Keywords: ZStream
Target Release: 6.0 (Juno)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-ceilometer-2014.2.3-3.el7 Doc Type: Bug Fix
Doc Text:
Previously, OpenStack Telemetry did not handle a specific exception (AutoReconnect) when MongoDB ReplicaSet was used. As a result, reconnections did not work properly. With this update, built-in handling in the 'pymongo' client is used to deal with AutoReconnect gracefully. As a result, connection retry is handled in an acceptable fashion in both single and ReplicaSet installations.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-05 13:10:47 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:

Comment 3 Chris Dent 2015-04-14 15:27:45 UTC
This hasn't been a clean backport: reconnection strategies evolved in the intervening time causing conflicts in the main code and failing tests (which relied on a previous interface). I've made the necessary adjustments in the patch (which will link up here soon after I've got local unit tests passing) but I would recommend that the patch and the resulting packaged stuff get a somewhat more than normal review.

Comment 9 Chris Dent 2015-04-17 16:20:16 UTC
I haven't got access to a replicaset to test this but it is possible to test that the reconnection functionality works in a relatively straightforward fashion:

* do an installation (packstack --allinone is what I did)
* authenticate (`. keystonerc_admin `)
* confirm meters with `ceilometer meter-list`
* stop mongod `sudo service stop mongod`
* try meters again, get failure
* start mongod `sudo service start mongod`
* try meters again, get some

The reason for doing this, even in a non-replicaset setup, is that the backport completely replaces previous reconnection logic, so doing this confirms that the new stuff has the basic expected functionality.

Comment 10 Chris Dent 2015-04-22 19:15:52 UTC
Added some DocText, but note this is still ON_QA, for now, and though my own testing has shown that "it works" confirmation is pending.

Comment 11 Yurii Prokulevych 2015-04-24 17:25:10 UTC
Verified using replicaset with 3 members.

Comment 13 errata-xmlrpc 2015-05-05 13:10:47 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://rhn.redhat.com/errata/RHBA-2015-0930.html