Guru Meditation Reports broken with psutil

Bug #1430231 reported by stanzgy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo-incubator
Won't Fix
Undecided
Unassigned
oslo.reports
Fix Released
Undecided
Davanum Srinivas (DIMS)

Bug Description

Many gmr codes which invokes psutil are broken with lastest pstutil 2.2.1.

examples:
https://github.com/openstack/oslo-incubator/blob/master/openstack/common/report/models/process.py#L41

self['uids'] = {'real': process.uids.real,
    'effective': process.uids.effective,
    'saved': process.uids.saved}

try with ipython:

In [1]: import psutil

In [2]: a=psutil.Process(15097)

In [3]: a.uids
Out[3]: <bound method Process.uids of <psutil.Process(pid=15097, name='designate-centr') at 139686329973584>>

In [4]: a.uids.real
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-4-ef3b965e8ef8> in <module>()
----> 1 a.uids.real

AttributeError: 'function' object has no attribute 'real'

In [5]: a.uids().real
Out[5]: 1000

Revision history for this message
stanzgy (stanzgy) wrote :

psutil 2.0.0 which matches psutil>=1.1.1,<2.0.0 in global-requirement.txt also has the problem

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

@stanzgy - That requirement specification says "<2.0.0" so it should exclude the newer versions of the library.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

Related change in the incubator: https://review.openstack.org/#/c/162945/

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

To upgrade to the newer psutils we will actually need a version of our report module that supports both APIs. Then we can push that change out to the projects, update the global requirement, graduate the report library, raise its minimum version, update the projects to use it, then update the global requirements minimum version.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

We should fix this in oslo.reports

Changed in oslo-incubator:
status: New → Won't Fix
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :
Changed in oslo.reports:
status: New → In Progress
assignee: nobody → Davanum Srinivas (DIMS) (dims-v)
Changed in oslo.reports:
status: In Progress → Fix Committed
Changed in oslo.reports:
milestone: none → 0.4.0
status: Fix Committed → Fix Released
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.