[Bug 1570356] Re: unable to load plugins in Centos
Dmitrii Shcherbakov
1570356 at bugs.launchpad.net
Mon Mar 6 15:12:15 UTC 2017
$ lxc launch ubuntu:xenial lp1570356
Creating lp1570356
Starting lp1570356
$ lxc exec lp1570356 bash
root at lp1570356:~#
root at lp1570356:~# apt install barbican-api
...
root at lp1570356:~# dpkg -l 'barbican*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=======================================================-================================-================================-====================================================================================================================
ii barbican-api 1:2.0.0-0ubuntu1 all OpenStack Key Management Service - API Server
ii barbican-common 1:2.0.0-0ubuntu1 all OpenStack Key Management Service - common files
root at lp1570356:~# python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import barbican.plugin.interface.certificate_manager
Option "verbose" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future.
Could not load 'simple_certificate_event': cannot import name certificate_manager
cannot import name certificate_manager
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/stevedore/extension.py", line 163, in _load_plugins
verify_requirements,
File "/usr/lib/python2.7/dist-packages/stevedore/named.py", line 123, in _load_one_plugin
verify_requirements,
File "/usr/lib/python2.7/dist-packages/stevedore/extension.py", line 184, in _load_one_plugin
plugin = ep.resolve()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2235, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python2.7/dist-packages/barbican/plugin/simple_certificate_manager.py", line 19, in <module>
from barbican.plugin.interface import certificate_manager as cert
ImportError: cannot import name certificate_manager
root at lp1570356:~# echo 'deb http://archive.ubuntu.com/ubuntu/ xenial-proposed restricted main multiverse universe' >> /etc/apt/sources.list
root at lp1570356:~# sudo apt update
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-proposed InRelease [253 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 Packages [104 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial-proposed/main Translation-en [36,8 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial-proposed/multiverse amd64 Packages [1 024 B]
Get:9 http://archive.ubuntu.com/ubuntu xenial-proposed/multiverse Translation-en [784 B]
Get:10 http://archive.ubuntu.com/ubuntu xenial-proposed/universe amd64 Packages [48,1 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-proposed/universe Translation-en [16,9 kB]
Fetched 768 kB in 1s (492 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
19 packages can be upgraded. Run 'apt list --upgradable' to see them.
root at lp1570356:~# sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
snap-confine
Use 'sudo apt autoremove' to remove it.
The following packages will be upgraded:
barbican-api barbican-common coreutils init init-system-helpers libpam-systemd libpci3 libsystemd0 libudev1 mdadm pciutils python-barbican snap-confine snapd systemd systemd-sysv ubuntu-core-launcher udev zlib1g
19 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 16,6 MB of archives.
After this operation, 1 574 kB of additional disk space will be used.
Do you want to continue? [Y/n]
...
Get:17 http://archive.ubuntu.com/ubuntu xenial-proposed/universe amd64 barbican-api all 1:2.0.0-0ubuntu1.1 [2 734 B]
Get:18 http://archive.ubuntu.com/ubuntu xenial-proposed/universe amd64 barbican-common all 1:2.0.0-0ubuntu1.1 [10,4 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial-proposed/universe amd64 python-barbican all 1:2.0.0-0ubuntu1.1 [226 kB]
...
root at lp1570356:~# python
>>> import barbican.plugin.interface.certificate_manager
Option "verbose" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future.
>>>
** Tags removed: verification-needed
** Tags added: verification-done
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to barbican in Ubuntu.
https://bugs.launchpad.net/bugs/1570356
Title:
unable to load plugins in Centos
Status in Barbican:
Fix Released
Status in barbican package in Ubuntu:
Fix Released
Status in barbican source package in Xenial:
Fix Committed
Bug description:
The certificate_manager module in barbican/plugins/interface creates
an instance of _CertificateEventPluginManager whithin that same
module. the _CertificateEventPluginManager in turn, imports the
plugins, which import the certificate_manager module itself. So in
Centos we see that this causes an error when trying to import the
modules:
Apr 11 15:33:31 centos-7-ovh-gra1-54094 gunicorn[25012]: cannot import name certificate_manager
Apr 11 15:33:31 centos-7-ovh-gra1-54094 gunicorn[25012]: Traceback (most recent call last):
Apr 11 15:33:31 centos-7-ovh-gra1-54094 gunicorn[25012]: File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 163, in _load_plugins
Apr 11 15:33:31 centos-7-ovh-gra1-54094 gunicorn[25012]: verify_requirements,
Apr 11 15:33:31 centos-7-ovh-gra1-54094 gunicorn[25012]: File "/usr/lib/python2.7/site-packages/stevedore/named.py", line 123, in _load_one_plugin
Apr 11 15:33:31 centos-7-ovh-gra1-54094 gunicorn[25012]: verify_requirements,
Apr 11 15:33:31 centos-7-ovh-gra1-54094 gunicorn[25012]: File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 184, in _load_one_plugin
Apr 11 15:33:31 centos-7-ovh-gra1-54094 gunicorn[25012]: plugin = ep.resolve()
Apr 11 15:33:31 centos-7-ovh-gra1-54094 gunicorn[25012]: File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2208, in resolve
Apr 11 15:33:31 centos-7-ovh-gra1-54094 gunicorn[25012]: module = __import__(self.module_name, fromlist=['__name__'], level=0)
Apr 11 15:33:31 centos-7-ovh-gra1-54094 gunicorn[25012]: File "/usr/lib/python2.7/site-packages/barbican/plugin/simple_certificate_manager.py", line 19, in <module>
Apr 11 15:33:31 centos-7-ovh-gra1-54094 gunicorn[25012]: from barbican.plugin.interface import certificate_manager as cert
Apr 11 15:33:31 centos-7-ovh-gra1-54094 gunicorn[25012]: ImportError: cannot import name certificate_manager
This is due to the circular dependency I mentioned above.
To manage notifications about this bug go to:
https://bugs.launchpad.net/barbican/+bug/1570356/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list