yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #18521
[Bug 1352619] [NEW] Cisco plugin module become the neutron dependence
Public bug reported:
In the former neutron db migration code. We don't have to install the
cisco plugin module if user don't need it. But now, because of the
latest merged py file
https://github.com/openstack/neutron/blob/master/neutron/db/migration/alembic_migrations/versions/5446f2a45467_set_server_default.py
import the cisco_constants(line 34), the user have to install it.
Otherwise, it will raise a cisco module miss error. However, this is a
neutron plugin, it should not be the neutron dependence.
The error can be reproduced by runnig "neutron-db-manage --config-file
/etc/neutron/neutron.conf --config-file
/etc/neutron/plugins/ml2/ml2_conf.ini current".
Error information.
[root@rhelhw ~]# neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini current
INFO [alembic.migration] Context impl MySQLImpl.
INFO [alembic.migration] Will assume non-transactional DDL.
Traceback (most recent call last):
File "/usr/bin/neutron-db-manage", line 10, in <module>
sys.exit(main())
File "/usr/lib/python2.6/site-packages/neutron/db/migration/cli.py", line 171, in main
CONF.command.func(config, CONF.command.name)
File "/usr/lib/python2.6/site-packages/neutron/db/migration/cli.py", line 63, in do_alembic_command
getattr(alembic_command, cmd)(config, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/alembic/command.py", line 233, in current
script.run_env()
File "/usr/lib/python2.6/site-packages/alembic/script.py", line 203, in run_env
util.load_python_file(self.dir, 'env.py')
File "/usr/lib/python2.6/site-packages/alembic/util.py", line 212, in load_python_file
module = load_module_py(module_id, path)
File "/usr/lib/python2.6/site-packages/alembic/compat.py", line 58, in load_module_py
mod = imp.load_source(module_id, path, fp)
File "/usr/lib/python2.6/site-packages/neutron/db/migration/alembic_migrations/env.py", line 106, in <module>
run_migrations_online()
File "/usr/lib/python2.6/site-packages/neutron/db/migration/alembic_migrations/env.py", line 90, in run_migrations_online
options=build_options())
File "<string>", line 7, in run_migrations
File "/usr/lib/python2.6/site-packages/alembic/environment.py", line 688, in run_migrations
self.get_context().run_migrations(**kw)
File "/usr/lib/python2.6/site-packages/alembic/migration.py", line 242, in run_migrations
self):
File "/usr/lib/python2.6/site-packages/alembic/command.py", line 214, in display_version
rev = script.get_revision(rev)
File "/usr/lib/python2.6/site-packages/alembic/script.py", line 102, in get_revision
return self._revision_map[id_]
File "/usr/lib/python2.6/site-packages/alembic/util.py", line 268, in __get__
obj.__dict__[self.__name__] = result = self.fget(obj)
File "/usr/lib/python2.6/site-packages/alembic/script.py", line 213, in _revision_map
script = Script._from_filename(self, self.versions, file_)
File "/usr/lib/python2.6/site-packages/alembic/script.py", line 496, in _from_filename
module = util.load_python_file(dir_, filename)
File "/usr/lib/python2.6/site-packages/alembic/util.py", line 212, in load_python_file
module = load_module_py(module_id, path)
File "/usr/lib/python2.6/site-packages/alembic/compat.py", line 58, in load_module_py
mod = imp.load_source(module_id, path, fp)
File "/usr/lib/python2.6/site-packages/neutron/db/migration/alembic_migrations/versions/5446f2a45467_set_server_default.py", line 34, in <module>
from neutron.plugins.cisco.common import cisco_constants
ImportError: No module named cisco.common
** Affects: neutron
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1352619
Title:
Cisco plugin module become the neutron dependence
Status in OpenStack Neutron (virtual network service):
New
Bug description:
In the former neutron db migration code. We don't have to install the
cisco plugin module if user don't need it. But now, because of the
latest merged py file
https://github.com/openstack/neutron/blob/master/neutron/db/migration/alembic_migrations/versions/5446f2a45467_set_server_default.py
import the cisco_constants(line 34), the user have to install it.
Otherwise, it will raise a cisco module miss error. However, this is
a neutron plugin, it should not be the neutron dependence.
The error can be reproduced by runnig "neutron-db-manage --config-file
/etc/neutron/neutron.conf --config-file
/etc/neutron/plugins/ml2/ml2_conf.ini current".
Error information.
[root@rhelhw ~]# neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini current
INFO [alembic.migration] Context impl MySQLImpl.
INFO [alembic.migration] Will assume non-transactional DDL.
Traceback (most recent call last):
File "/usr/bin/neutron-db-manage", line 10, in <module>
sys.exit(main())
File "/usr/lib/python2.6/site-packages/neutron/db/migration/cli.py", line 171, in main
CONF.command.func(config, CONF.command.name)
File "/usr/lib/python2.6/site-packages/neutron/db/migration/cli.py", line 63, in do_alembic_command
getattr(alembic_command, cmd)(config, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/alembic/command.py", line 233, in current
script.run_env()
File "/usr/lib/python2.6/site-packages/alembic/script.py", line 203, in run_env
util.load_python_file(self.dir, 'env.py')
File "/usr/lib/python2.6/site-packages/alembic/util.py", line 212, in load_python_file
module = load_module_py(module_id, path)
File "/usr/lib/python2.6/site-packages/alembic/compat.py", line 58, in load_module_py
mod = imp.load_source(module_id, path, fp)
File "/usr/lib/python2.6/site-packages/neutron/db/migration/alembic_migrations/env.py", line 106, in <module>
run_migrations_online()
File "/usr/lib/python2.6/site-packages/neutron/db/migration/alembic_migrations/env.py", line 90, in run_migrations_online
options=build_options())
File "<string>", line 7, in run_migrations
File "/usr/lib/python2.6/site-packages/alembic/environment.py", line 688, in run_migrations
self.get_context().run_migrations(**kw)
File "/usr/lib/python2.6/site-packages/alembic/migration.py", line 242, in run_migrations
self):
File "/usr/lib/python2.6/site-packages/alembic/command.py", line 214, in display_version
rev = script.get_revision(rev)
File "/usr/lib/python2.6/site-packages/alembic/script.py", line 102, in get_revision
return self._revision_map[id_]
File "/usr/lib/python2.6/site-packages/alembic/util.py", line 268, in __get__
obj.__dict__[self.__name__] = result = self.fget(obj)
File "/usr/lib/python2.6/site-packages/alembic/script.py", line 213, in _revision_map
script = Script._from_filename(self, self.versions, file_)
File "/usr/lib/python2.6/site-packages/alembic/script.py", line 496, in _from_filename
module = util.load_python_file(dir_, filename)
File "/usr/lib/python2.6/site-packages/alembic/util.py", line 212, in load_python_file
module = load_module_py(module_id, path)
File "/usr/lib/python2.6/site-packages/alembic/compat.py", line 58, in load_module_py
mod = imp.load_source(module_id, path, fp)
File "/usr/lib/python2.6/site-packages/neutron/db/migration/alembic_migrations/versions/5446f2a45467_set_server_default.py", line 34, in <module>
from neutron.plugins.cisco.common import cisco_constants
ImportError: No module named cisco.common
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1352619/+subscriptions
Follow ups
References