tox -r fails to install os-resource-classes in extracted placement repo when running tests

Bug #1816625 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

When trying to run py35 and functional-py35 tests in the extracted openstack/placement repo, it fails to install os-resource-classes even though that is in requirements.txt and I'm rebuilding the venv, e.g.:

osboxes@osboxes:~/git/placement$ tox -r -e py35
py35 recreate: /home/osboxes/git/placement/.tox/py35
py35 installdeps: -r/home/osboxes/git/placement/test-requirements.txt
py35 develop-inst: /home/osboxes/git/placement
py35 installed: alembic==1.0.7,amqp==2.4.1,appdirs==1.4.3,asn1crypto==0.24.0,atomicwrites==1.3.0,attrs==18.2.0,automaton==1.15.0,Babel==2.6.0,bandit==1.5.1,bcrypt==3.1.6,cachetools==3.1.0,castellan==1.2.0,certifi==2018.11.29,cffi==1.12.1,chardet==3.0.4,cliff==2.14.0,cmd2==0.8.9,colorama==0.4.1,coverage==4.5.2,cryptography==2.5,cursive==0.2.2,debtcollector==1.20.0,decorator==4.3.2,dnspython==1.15.0,dogpile.cache==0.7.1,eventlet==0.24.1,extras==1.0.0,fasteners==0.14.1,fixtures==3.0.0,flake8==2.5.5,future==0.17.1,futurist==1.8.0,gabbi==1.44.0,gitdb2==2.0.5,GitPython==2.1.11,greenlet==0.4.15,grpcio==1.15.0,hacking==0.12.0,idna==2.8,iso8601==0.1.12,Jinja2==2.10,jmespath==0.9.3,jsonpatch==1.23,jsonpath-rw==1.4.0,jsonpath-rw-ext==1.2.0,jsonpointer==2.0,jsonschema==2.6.0,keystoneauth1==3.11.2,keystonemiddleware==5.3.0,kombu==4.3.0,linecache2==1.0.0,lxml==4.3.1,Mako==1.0.7,MarkupSafe==1.1.0,mccabe==0.2.1,microversion-parse==0.2.1,mock==2.0.0,monotonic==1.5,more-itertools==6.0.0,mox3==0.26.0,msgpack==0.6.1,munch==2.3.2,netaddr==0.7.19,netifaces==0.10.9,networkx==2.2,numpy==1.16.1,-e git://git.openstack.org/openstack/placement@530be3d3985f02e2eb7d45e6f2977b294eb9cc65#egg=openstack_placement,openstacksdk==0.24.0,os-brick==2.7.0,os-client-config==1.31.2,os-service-types==1.5.0,os-traits==0.11.0,os-vif==1.14.0,os-win==4.2.0,os-xenapi==0.3.4,osc-lib==1.12.0,oslo.cache==1.33.0,oslo.concurrency==3.29.0,oslo.config==6.8.0,oslo.context==2.22.0,oslo.db==4.44.0,oslo.i18n==3.23.0,oslo.log==3.42.2,oslo.messaging==9.4.0,oslo.middleware==3.37.0,oslo.policy==2.1.0,oslo.privsep==1.32.0,oslo.reports==1.29.1,oslo.rootwrap==5.15.1,oslo.serialization==2.28.1,oslo.service==1.37.0,oslo.utils==3.40.2,oslo.versionedobjects==1.35.0,oslotest==3.7.0,ovs==2.10.0,ovsdbapp==0.15.0,paramiko==2.4.2,Paste==3.0.6,PasteDeploy==2.0.1,pathlib2==2.3.3,pbr==5.1.2,pep8==1.5.7,placement==0.0.1.dev10681,pluggy==0.8.1,ply==3.11,prettytable==0.7.2,psutil==5.5.1,psycopg2==2.7.7,py==1.7.0,pyasn1==0.4.5,pyasn1-modules==0.2.4,pycadf==2.9.0,pycparser==2.19,pydot==1.4.1,pyflakes==0.8.1,pyinotify==0.9.6,PyJWT==1.7.1,PyMySQL==0.9.3,PyNaCl==1.3.0,pyOpenSSL==19.0.0,pyparsing==2.3.1,pyperclip==1.7.0,pypowervm==1.1.20,pyroute2==0.5.3,pytest==4.3.0,python-barbicanclient==4.8.1,python-cinderclient==4.1.0,python-dateutil==2.8.0,python-editor==1.0.4,python-glanceclient==2.15.0,python-keystoneclient==3.18.0,python-mimeparse==1.6.0,python-neutronclient==6.11.0,python-subunit==1.3.0,pytz==2018.9,PyYAML==3.13,repoze.lru==0.7,requests==2.21.0,requestsexceptions==1.4.0,retrying==1.3.3,rfc3986==1.2.0,Routes==2.4.1,simplejson==3.16.0,six==1.12.0,smmap2==2.0.5,sortedcontainers==2.1.0,SQLAlchemy==1.2.18,sqlalchemy-migrate==0.12.0,sqlparse==0.2.4,statsd==3.3.0,stestr==2.2.0,stevedore==1.30.0,taskflow==3.4.0,Tempita==0.5.2,tenacity==5.0.3,testresources==2.0.1,testscenarios==0.5.0,testtools==2.3.0,tooz==1.64.1,traceback2==1.4.0,unittest2==1.1.0,urllib3==1.24.1,vine==1.2.0,voluptuous==0.11.5,warlock==1.3.0,wcwidth==0.1.7,WebOb==1.8.5,websockify==0.8.0,wrapt==1.11.1,wsgi-intercept==1.8.0,yappi==0.99,zVMCloudConnector==1.4.0
py35 runtests: PYTHONHASHSEED='3780858058'
py35 runtests: commands[0] | find . -type f -name '*.pyc' -delete
py35 runtests: commands[1] | stestr run

=========================
Failures during discovery
=========================
--- import errors ---
Failed to import test module: placement.tests.unit.cmd.test_manage
Traceback (most recent call last):
  File "/home/osboxes/git/placement/.tox/py35/lib/python3.5/site-packages/unittest2/loader.py", line 456, in _find_test_path
    module = self._get_module_from_name(name)
  File "/home/osboxes/git/placement/.tox/py35/lib/python3.5/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
    __import__(name)
  File "/home/osboxes/git/placement/placement/tests/unit/cmd/test_manage.py", line 21, in <module>
    from placement.cmd import manage
  File "/home/osboxes/git/placement/placement/cmd/manage.py", line 29, in <module>
    from placement.objects import resource_provider as rp_obj
  File "/home/osboxes/git/placement/placement/objects/resource_provider.py", line 24, in <module>
    import os_resource_classes as orc
ImportError: No module named 'os_resource_classes'

When I hit this I have to manually source the venv and install the library, which is unfortunate.

Revision history for this message
Matt Riedemann (mriedem) wrote :

Here are my pip and tox versions:

osboxes@osboxes:~/git/placement$ pip show pip tox
---
Metadata-Version: 1.1
Name: pip
Version: 8.1.1
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: <email address hidden>
License: MIT
Location: /usr/lib/python2.7/dist-packages
Requires:
Classifiers:
  Development Status :: 5 - Production/Stable
  Intended Audience :: Developers
  License :: OSI Approved :: MIT License
  Topic :: Software Development :: Build Tools
  Programming Language :: Python :: 2
  Programming Language :: Python :: 2.6
  Programming Language :: Python :: 2.7
  Programming Language :: Python :: 3
  Programming Language :: Python :: 3.3
  Programming Language :: Python :: 3.4
  Programming Language :: Python :: 3.5
  Programming Language :: Python :: Implementation :: PyPy
Entry-points:
  [console_scripts]
  pip = pip:main
  pip2 = pip:main
  pip2.7 = pip:main
---
Metadata-Version: 2.1
Name: tox
Version: 3.1.1
Summary: virtualenv-based automation of test activities
Home-page: https://tox.readthedocs.org/
Author: holger krekel
Author-email: <email address hidden>
Installer: pip
License: http://opensource.org/licenses/MIT
Location: /home/osboxes/.local/lib/python2.7/site-packages
Requires: packaging, py, six, pluggy, virtualenv
Classifiers:
  Development Status :: 5 - Production/Stable
  Framework :: tox
  Intended Audience :: Developers
  License :: OSI Approved :: MIT License
  Operating System :: POSIX
  Operating System :: Microsoft :: Windows
  Operating System :: MacOS :: MacOS X
  Topic :: Software Development :: Testing
  Topic :: Software Development :: Libraries
  Topic :: Utilities
  Programming Language :: Python :: 2
  Programming Language :: Python :: 2.7
  Programming Language :: Python :: 3
  Programming Language :: Python :: 3.4
  Programming Language :: Python :: 3.5
  Programming Language :: Python :: 3.6
Entry-points:
  [console_scripts]
  tox = tox:cmdline
  tox-quickstart = tox._quickstart:main
You are using pip version 8.1.1, however version 19.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

tags: added: placement testing
Revision history for this message
Matt Riedemann (mriedem) wrote :

Had to also manually install oslo.upgradecheck.

Revision history for this message
Matt Riedemann (mriedem) wrote :

I completely deleted the local repo and re-cloned it and this time tox -r -e py35 works, so must have been something lingering.

Changed in nova:
status: New → Invalid
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.