Investigate what's involved in remove the <2.0.0 cap for psutil in g-r

Bug #1645918 reported by Matthew Thode
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Unassigned
OpenStack Global Requirements
Fix Released
Undecided
Dirk Mueller

Bug Description

Various projects and distributions would like to move to a newer versions of psutils. psutils was capped in 2014 when 2.0 came out because back then most projects were not compatible with it.

psutil 2.x and above has a lot of API changes as described in:
https://github.com/giampaolo/psutil/blob/master/HISTORY.rst

In many cases the adjustments are straightforward and can be made in a compatible fashion, allowing us to remove the cap and eventually move
to a higher minimum version.

Dirk Mueller (dmllr)
Changed in openstack-requirements:
assignee: nobody → Dirk Mueller (dmllr)
Dirk Mueller (dmllr)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to glance (master)

Reviewed: https://review.openstack.org/409140
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=06c4313ec0ed043970a60cbbc463f3dcad71f6f4
Submitter: Jenkins
Branch: master

commit 06c4313ec0ed043970a60cbbc463f3dcad71f6f4
Author: Dirk Mueller <email address hidden>
Date: Fri Dec 9 14:11:33 2016 +0100

    Adjust test suite for new psutil versions

    psutil 2.x and above has a lot of API changes as described in:
    https://github.com/giampaolo/psutil/blob/master/HISTORY.rst

    So we should work correctly with both old and new psutil
    versions by using a version check and use the correct
    method/attributes. This allows to eventually unlift the version
    cap that starts to hurt.

    Related-Bug: 1645918
    Change-Id: I6be775e83876271012f6b7a777ea2b5cc3a008f6

Revision history for this message
Shunli Zhou (shunliz) wrote :

with local.conf of devstack as below;

[[local|localrc]]
DATABASE_PASSWORD=password
RABBIT_PASSWORD=password
SERVICE_TOKEN=password
SERVICE_PASSWORD=password
ADMIN_PASSWORD=password
# magnum requires the following to be set correctly
PUBLIC_INTERFACE=enp0s3
HOST_IP=10.0.2.15

NOVA_BRANCH=stable/mitaka

# Enable barbican service and use it to store TLS certificates
# For details http://docs.openstack.org/developer/magnum/dev/tls.html
enable_plugin barbican https://git.openstack.org/openstack/barbican

enable_plugin heat https://git.openstack.org/openstack/heat

# Enable magnum plugin after dependent plugins
enable_plugin magnum https://git.openstack.org/openstack/magnum

# Optional: uncomment to enable the Magnum UI plugin in Horizon
#enable_plugin magnum-ui https://github.com/openstack/magnum-ui

VOLUME_BACKING_FILE_SIZE=20G

I get below error when run stack.sh

Ignoring watchdog: markers 'python_version == "3.4"' don't match your environment
Ignoring watchdog: markers 'python_version == "3.5"' don't match your environment
Obtaining file:///opt/stack/nova
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 335, in run
    wb.build(autobuilding=True)
  File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 521, in _prepare_file
    req_to_install.check_if_exists()
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 1036, in check_if_exists
    self.req.name
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 558, in get_distribution
    dist = get_provider(dist)
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 432, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 968, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 859, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
ContextualVersionConflict: (psutil 5.1.3 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('psutil<2.0.0,>=1.1.1'), set(['nova']))

Not sure it is the bug of openstack-requirments or bug of the devstack.

Revision history for this message
Matthew Thode (prometheanfire) wrote :

psutil was uncapped and updated

Changed in openstack-requirements:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/requirements 1.1.0

This issue was fixed in the openstack/requirements 1.1.0 release.

Revision history for this message
Cyril Roelandt (cyril-roelandt) wrote :

The Glance patch from 2017 has been released a while ago.

Changed in glance:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/requirements ocata-eol

This issue was fixed in the openstack/requirements ocata-eol 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.