python-psutil conflict

Bug #1671898 reported by Piyush Srivastava
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.21.x
Invalid
High
Santosh Gupta
R3.1
Fix Committed
High
Santosh Gupta
R3.2
Fix Committed
High
Santosh Gupta
Trunk
Invalid
High
Santosh Gupta
OpenContrail
Fix Committed
Undecided
Unassigned

Bug Description

After a refresh of one of our internal repos, a newer version of python-psutil package was brought in python2-psutil-5.0.1-2, while contrail provided us with python-psutil-2.2.1-1. This caused issues with nodemgr services failing because of incompatibility in these package versions.

AttributeError: 'Process' object has no attribute 'get_cpu_times'

We have temporarily disabled the internal yum repo which brought in the newer version of python-psutil but this won't fly as a long term solution as we depend a lot on this repo.

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/gevent/greenlet.py", line 534, in run
    result = self._run(*self.args, **self.kwargs)
  File "/usr/lib/python2.7/site-packages/nodemgr/common/event_manager.py", line 645, in runforever
    self.do_periodic_events()
  File "/usr/lib/python2.7/site-packages/nodemgr/common/event_manager.py", line 626, in do_periodic_events
    self.event_tick_60()
  File "/usr/lib/python2.7/site-packages/nodemgr/common/event_manager.py", line 567, in event_tick_60
    process_mem_cpu_usage = self.get_all_processes_mem_cpu_usage()
  File "/usr/lib/python2.7/site-packages/nodemgr/common/event_manager.py", line 412, in get_all_processes_mem_cpu_usage
    process_mem_cpu = mem_cpu_usage_data.get_process_mem_cpu_info()
  File "/usr/lib/python2.7/site-packages/nodemgr/common/cpuinfo.py", line 135, in get_process_mem_cpu_info
    process_mem_cpu.cpu_share = self._get_process_cpu_share()
  File "/usr/lib/python2.7/site-packages/nodemgr/common/cpuinfo.py", line 111, in _get_process_cpu_share
    current_cpu = self._process.get_cpu_times()
AttributeError: 'Process' object has no attribute 'get_cpu_times'
<Greenlet at 0x1c0a190: <bound method ControlEventManager.runforever of <nodemgr.control_nodemgr.control_event_manager.ControlEventManager object at 0x1a2eed0>>> failed with AttributeError

Jeba Paulaiyan (jebap)
Changed in juniperopenstack:
importance: Undecided → High
assignee: nobody → Nagendra Prasath (npchandran)
milestone: none → r2.21.3
tags: added: packaging
Revision history for this message
Jeba Paulaiyan (jebap) wrote :

python2-psutil-5.0.1-2 has issue with database-node-mgr. Once Vinay updates Centos cache in 3.2, analytics team should solve the dependency on python2-psutil-5.0.1-2.

tags: added: analytics
Jeba Paulaiyan (jebap)
no longer affects: juniperopenstack/r2.21.x
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.2

Review in progress for https://review.opencontrail.org/29893
Submitter: Santosh Gupta (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.1

Review in progress for https://review.opencontrail.org/29894
Submitter: Santosh Gupta (<email address hidden>)

Revision history for this message
Santosh Gupta (sangupta) wrote :

Issue already fixed on mainline.
Issue not applicable for R2.21.x.
Marking these branches as Invalid.

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/29894
Committed: http://github.org/Juniper/contrail-controller/commit/d116f9fd7852528eb7a77a9971dcdb96d862e393
Submitter: Zuul (<email address hidden>)
Branch: R3.1

commit d116f9fd7852528eb7a77a9971dcdb96d862e393
Author: Santosh Gupta <email address hidden>
Date: Mon Mar 27 11:10:28 2017 -0700

Add check for psutil process.get_cpu_times()

Added a check for the psutil process.get_cpu_times() attribute before using it.

Change-Id: If1a231a26cabb3dd62e78935b59c8880a20f655b
Closes-Bug: #1671898

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/29893
Committed: http://github.org/Juniper/contrail-controller/commit/9c9b7675abff535bb1b80bd8e5c340ba5f0a7dbb
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit 9c9b7675abff535bb1b80bd8e5c340ba5f0a7dbb
Author: Santosh Gupta <email address hidden>
Date: Mon Mar 27 11:03:17 2017 -0700

Add check for psutil process.get_cpu_times()

Added a check for the psutil process.get_cpu_times() attribute before using it.

Change-Id: I758624beac4e9192a855e1cec62f247f6bad9f88
Closes-Bug: #1671898

Sachin Bansal (sbansal)
Changed in opencontrail:
status: New → Fix Committed
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.