osprofiler fails when it is configed with mongon

Bug #1827480 reported by XiaojueGuan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
osprofiler
Fix Released
Undecided
XiaojueGuan

Bug Description

ERROR openstack_dashboard.api.rest.utils error invoking apiclient
Traceback (most recent call last):
  File "/Users/robot/code/Openstack/Rep/horizon/openstack_dashboard/api/rest/utils.py", line 128, in _wrapped
    data = function(self, request, *args, **kw)
  File "/Users/robot/code/Openstack/Rep/horizon/openstack_dashboard/contrib/developer/profiler/views.py", line 40, in get
    return api.list_traces(request)
  File "/Users/robot/code/Openstack/Rep/horizon/openstack_dashboard/contrib/developer/profiler/api.py", line 84, in list_traces
    traces = engine.list_traces(fields)
  File "/Users/robot/code/Openstack/Rep/horizon/.tox/venv/lib/python3.7/site-packages/osprofiler/drivers/mongodb.py", line 83, in list_traces
    fields = set(fields or self.default_trace_fields)
  File "/Users/robot/code/Openstack/Rep/horizon/.tox/venv/lib/python3.7/site-packages/pymongo/collection.py", line 929, in find
    return Cursor(self, *args, **kwargs)
  File "/Users/robot/code/Openstack/Rep/horizon/.tox/venv/lib/python3.7/site-packages/pymongo/cursor.py", line 119, in __init__
    validate_is_mapping("filter", spec)
  File "/Users/robot/code/Openstack/Rep/horizon/.tox/venv/lib/python3.7/site-packages/pymongo/common.py", line 348, in validate_is_mapping
    "collections.Mapping" % (option,))
TypeError: filter must be an instance of dict, bson.son.SON, or other type that inherits from collections.Mapping

Changed in osprofiler:
assignee: nobody → XiaojueGuan (xiaojuegaun)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to osprofiler (master)

Fix proposed to branch: master
Review: https://review.opendev.org/656929

Changed in osprofiler:
status: New → In Progress
Revision history for this message
XiaojueGuan (xiaojuegaun) wrote :

https://github.com/openstack/osprofiler/blob/master/test-requirements.txt
the minimum version of pymongo osprofile required is 3.0.2
test with this version in python2.5 and python 3.7 both failed

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to osprofiler (master)

Reviewed: https://review.opendev.org/656929
Committed: https://git.openstack.org/cgit/openstack/osprofiler/commit/?id=5386d7c40cdaef39a08b69fcce96467a5396c6ee
Submitter: Zuul
Branch: master

commit 5386d7c40cdaef39a08b69fcce96467a5396c6ee
Author: XiaojueGuan <email address hidden>
Date: Fri May 3 15:40:04 2019 +0800

    change function list_traces of mongodb module

    osprofiler fails when it is configed with mongon.
    the minimum version of pymongo osprofile requires is 3.0.2
    and in this version and after when function list_traces is
    is invoked error will show described in the bug issue.

    Change-Id: I2510660c36aaa89117a97c67b4cb61fa3dade14d
    Closes-Bug: 1827480

Changed in osprofiler:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/osprofiler 2.8.0

This issue was fixed in the openstack/osprofiler 2.8.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.