Bug 1265708 - Ceilometer requires pymongo>=3.0.2
Ceilometer requires pymongo>=3.0.2
Status: CLOSED CURRENTRELEASE
Product: RDO
Classification: Community
Component: openstack-ceilometer (Show other bugs)
trunk
Unspecified Unspecified
unspecified Severity high
: ---
: Liberty
Assigned To: Pradeep Kilambi
Yurii Prokulevych
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-23 09:57 EDT by Yurii Prokulevych
Modified: 2016-03-30 19:11 EDT (History)
4 users (show)

See Also:
Fixed In Version: python-pymongo-3.0.3-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-30 19:11:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yurii Prokulevych 2015-09-23 09:57:40 EDT
Description of problem:
Ceilometer collector fails to store events/meters in mongodb backend:
2015-09-23 15:17:54.571 17869 DEBUG ceilometer.dispatcher.database [-] metering data image.size for c3c1b95b-8447-4286-9c5d-29c20223705a @ 2015-09-23 13:17:54.553343: 13200896 record_metering_data /usr/lib/pytho
n2.7/site-packages/ceilometer/dispatcher/database.py:82
2015-09-23 15:17:54.573 17869 ERROR ceilometer.dispatcher.database [-] Failed to record metering data: 'module' object has no attribute 'ReturnDocument'
2015-09-23 15:17:54.573 17869 ERROR ceilometer.dispatcher.database Traceback (most recent call last):
2015-09-23 15:17:54.573 17869 ERROR ceilometer.dispatcher.database   File "/usr/lib/python2.7/site-packages/ceilometer/dispatcher/database.py", line 92, in record_metering_data
2015-09-23 15:17:54.573 17869 ERROR ceilometer.dispatcher.database     self.meter_conn.record_metering_data(meter)
2015-09-23 15:17:54.573 17869 ERROR ceilometer.dispatcher.database   File "/usr/lib/python2.7/site-packages/ceilometer/storage/impl_mongodb.py", line 274, in record_metering_data
2015-09-23 15:17:54.573 17869 ERROR ceilometer.dispatcher.database     return_document=pymongo.ReturnDocument.AFTER,
2015-09-23 15:17:54.573 17869 ERROR ceilometer.dispatcher.database AttributeError: 'module' object has no attribute 'ReturnDocument'
2015-09-23 15:17:54.573 17869 ERROR ceilometer.dispatcher.database 
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher [-] Exception during message handling
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher Traceback (most recent call last):
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/notify/dispatcher.py", line 92, in _dispatch_and_handle_error
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher     executor_callback)
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/notify/dispatcher.py", line 135, in _dispatch
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher     metadata)
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher   File "/usr/lib/python2.7/site-packages/ceilometer/collector.py", line 175, in sample
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher     self.dispatcher_manager.map_method(self.method, payload)
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher   File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 251, in map_method
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher     method_name, *args, **kwds)
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher   File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 224, in map
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher     self._invoke_one_plugin(response.append, func, e, args, kwds)
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher   File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 255, in _invoke_one_plugin
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher     response_callback(func(e, *args, **kwds))
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher   File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 229, in _call_extension_method
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher     return getattr(extension.obj, method_name)(*args, **kwds)
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher   File "/usr/lib/python2.7/site-packages/ceilometer/dispatcher/database.py", line 92, in record_metering_data
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher     self.meter_conn.record_metering_data(meter)
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher   File "/usr/lib/python2.7/site-packages/ceilometer/storage/impl_mongodb.py", line 274, in record_metering_data
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher     return_document=pymongo.ReturnDocument.AFTER,
2015-09-23 15:17:54.574 17869 ERROR oslo_messaging.notify.dispatcher AttributeError: 'module' object has no attribute 'ReturnDocument'

According to https://github.com/openstack/ceilometer/blob/master/test-requirements.txt#L22 we need newer version of pymongo

Version-Release number of selected component (if applicable):
openstack-ceilometer-api-5.0.0.0b4-dev123.el7.centos.noarch
python-ceilometerclient-1.5.1-dev1.el7.centos.noarch
openstack-ceilometer-common-5.0.0.0b4-dev123.el7.centos.noarch
openstack-ceilometer-collector-5.0.0.0b4-dev123.el7.centos.noarch
openstack-ceilometer-polling-5.0.0.0b4-dev123.el7.centos.noarch
openstack-ceilometer-notification-5.0.0.0b4-dev123.el7.centos.noarch
openstack-ceilometer-central-5.0.0.0b4-dev123.el7.centos.noarch
openstack-ceilometer-compute-5.0.0.0b4-dev123.el7.centos.noarch
python-ceilometer-5.0.0.0b4-dev123.el7.centos.noarch
openstack-ceilometer-alarm-5.0.0.0b4-dev123.el7.centos.noarch

Actual results:
rpm -qa | grep mongo
mongodb-server-2.6.9-1.el7.x86_64
python-pymongo-2.5.2-2.el7.x86_64
mongodb-2.6.9-1.el7.x86_64

yum info python-pymongo.x86_64
Loaded plugins: product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Installed Packages
Name        : python-pymongo
Arch        : x86_64
Version     : 2.5.2
Release     : 2.el7
Size        : 1.1 M
Repo        : installed
From repo   : delorean-common-testing
Summary     : Python driver for MongoDB
URL         : http://api.mongodb.org/python
License     : ASL 2.0 and MIT
Description : The Python driver for MongoDB.

Expected results:


Additional info:
OS: RHEL7.1, packstack allinone installation
Comment 1 Pradeep Kilambi 2015-11-05 11:48:17 EST
python-pymongo 3.0.3-1.el7 now in delorean-common-testing repos.

Note You need to log in before you can comment on or make changes to this bug.