yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #55063
[Bug 1612959] Re: neutron DB sync fails: ImportError: No module named tests
** Also affects: openstack-ansible
Importance: Undecided
Status: New
** Changed in: openstack-ansible
Status: New => Confirmed
** Changed in: openstack-ansible
Importance: Undecided => High
** Changed in: openstack-ansible
Assignee: (unassigned) => Logan V (logan2211)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1612959
Title:
neutron DB sync fails: ImportError: No module named tests
Status in neutron:
In Progress
Status in openstack-ansible:
Confirmed
Bug description:
neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head
Traceback (most recent call last):
File "/usr/bin/neutron-db-manage", line 10, in <module>
sys.exit(main())
File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 686, in main
return_val |= bool(CONF.command.func(config, CONF.command.name))
File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 205, in do_upgrade
run_sanity_checks(config, revision)
File "/usr/lib/python2.7/site-packages/neutron/db/migration/cli.py", line 670, in run_sanity_checks
script_dir.run_env()
File "/usr/lib/python2.7/site-packages/alembic/script/base.py", line 397, in run_env
util.load_python_file(self.dir, 'env.py')
File "/usr/lib/python2.7/site-packages/alembic/util/pyfiles.py", line 81, in load_python_file
module = load_module_py(module_id, path)
File "/usr/lib/python2.7/site-packages/alembic/util/compat.py", line 79, in load_module_py
mod = imp.load_source(module_id, path, fp)
File "/usr/lib/python2.7/site-packages/neutron/db/migration/alembic_migrations/env.py", line 23, in <module>
from neutron.db.migration.models import head # noqa
File "/usr/lib/python2.7/site-packages/neutron/db/migration/models/head.py", line 66, in <module>
from neutron.tests import tools
ImportError: No module named tests
-----
The issue seems to be that in commit we started using code from
neutron.tests outside of the testing code. Specifically commit
7c0f189309789ebcbd5c20c5a86835576ffb5db3 now causes it to get used
during DB sync. Given that some distribution packages don't package up
the 'tests' code tree I think we shouldn't be using this code.
See also:
grep -lir neutron.tests * | grep -v tests
cmd/sanity/checks.py
db/migration/models/head.py
hacking/checks.py
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1612959/+subscriptions
References