
If you pass importutils.import_class a string that is not actually a reference to a python class, you get an "empty module" error. Cinder's keymgr.API call used to try to import the castellan backend directly, but this was not necessary as the castellan key_manager.API call will return the correct backend based on the api_class or backend option in the config file. If no api_class or backend option is specified, castellan key_manager API call will return a barbican backend by default [1]. Castellan used to require the full class name to specify the backend (i.e. api_class=castellan.key_manager.barbican_key_manager.BarbicanKeyManager), so the import_class call in cinder was no issue. Recently castellan was updated to use stevedore entry points and the config option name was changed to "backend" [2]. The change in castellan is backwards compatible so that if you use a full module name instead of the stevedore entry point name, it will still get the correct backend. However, the cinder code was not updated accordingly, so any time the shorthand stevedore entry point name for the backend is used instead of the full module name, the import_class call in cinder will fail. This change removes the unnecessary import_class call and adds an appropriate unit test that shows the "empty module" error does not occur anymore. 1.b13187b34d/castellan/key_manager/__init__.py (L25)
2.8980bf7da5
Closes-Bug: #1724952 Change-Id: I3f95cfe439d65d9cf746d4e3844bc70bc705625e
Team and repository tags
CINDER
You have come across a storage service for an open cloud computing service. It has identified itself as Cinder. It was abstracted from the Nova project.
- Wiki: https://wiki.openstack.org/Cinder
- Developer docs: https://docs.openstack.org/cinder/latest/
Getting Started
If you'd like to run from the master branch, you can clone the git repo:
For developer information please see HACKING.rst
You can raise bugs here https://bugs.launchpad.net/cinder
Python client
https://git.openstack.org/cgit/openstack/python-cinderclient
Description
Languages
Python
99.7%
Smarty
0.3%