We are trying to deploy Kolla OpenStack Victoria with Barbican crypto plugin p11_crypto but while creating volume with encryption we are facing issue.
Error Logs/Trace:
2021-10-12 08:49:42.331 39 INFO barbican.api.middleware.context [-] Begin processing request req-06d830b3-6278-4dd8-aaf4-b745c765b963
2021-10-12 08:49:42.647 39 INFO barbican.queue.server [req-281008bb-60bf-47d7-8c91-8dcc663014cd 858532b836bc49f2bdf3dcbe5ac99b32 020026bd70b3418082b82a4c7ef8156d - a10b075299a1427c9baeff6550b1744e a10b075299a1427c9baeff6550b1744e] Processing type order: order ID is 'e5054957-79b8-4149-b403-22cab2c2cd87' and request ID is 'req-281008bb-60bf-47d7-8c91-8dcc663014cd'
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils [req-281008bb-60bf-47d7-8c91-8dcc663014cd 858532b836bc49f2bdf3dcbe5ac99b32 020026bd70b3418082b82a4c7ef8156d - a10b075299a1427c9baeff6550b1744e a10b075299a1427c9baeff6550b1744e] Problem seen creating plugin: 'p11_crypto': OSError: cannot load library '/usr/lib/libCryptoki2_64.so': /usr/lib/libCryptoki2_64.so: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called '/usr/lib/libCryptoki2_64.so'
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils Traceback (most recent call last):
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils File "/usr/lib/python3.6/site-packages/barbican/plugin/util/utils.py", line 41, in instantiate_plugins
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils plugin_instance = ext.plugin(*invoke_args, **invoke_kwargs)
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils File "/usr/lib/python3.6/site-packages/barbican/plugin/crypto/p11_crypto.py", line 117, in __init__
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils self.pkcs11 = pkcs11 or self._create_pkcs11(plugin_conf, ffi)
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils File "/usr/lib/python3.6/site-packages/barbican/plugin/crypto/p11_crypto.py", line 313, in _create_pkcs11
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils hmac_keywrap_mechanism=plugin_conf.hmac_keywrap_mechanism
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils File "/usr/lib/python3.6/site-packages/barbican/plugin/crypto/pkcs11.py", line 385, in __init__
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils self.lib = self.ffi.dlopen(library_path)
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils File "/usr/lib64/python3.6/site-packages/cffi/api.py", line 146, in dlopen
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils lib, function_cache = _make_ffi_library(self, name, flags)
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils File "/usr/lib64/python3.6/site-packages/cffi/api.py", line 828, in _make_ffi_library
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils backendlib = _load_backend_lib(backend, libname, flags)
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils File "/usr/lib64/python3.6/site-packages/cffi/api.py", line 823, in _load_backend_lib
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils raise OSError(msg)
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils OSError: cannot load library '/usr/lib/libCryptoki2_64.so': /usr/lib/libCryptoki2_64.so: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called '/usr/lib/libCryptoki2_64.so'
2021-10-12 08:49:42.860 39 ERROR barbican.plugin.util.utils
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils [req-281008bb-60bf-47d7-8c91-8dcc663014cd 858532b836bc49f2bdf3dcbe5ac99b32 020026bd70b3418082b82a4c7ef8156d - a10b075299a1427c9baeff6550b1744e a10b075299a1427c9baeff6550b1744e] Problem seen creating plugin: 'p11_crypto': OSError: cannot load library '/usr/lib/libCryptoki2_64.so': /usr/lib/libCryptoki2_64.so: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called '/usr/lib/libCryptoki2_64.so'
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils Traceback (most recent call last):
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils File "/usr/lib/python3.6/site-packages/barbican/plugin/util/utils.py", line 41, in instantiate_plugins
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils plugin_instance = ext.plugin(*invoke_args, **invoke_kwargs)
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils File "/usr/lib/python3.6/site-packages/barbican/plugin/crypto/p11_crypto.py", line 117, in __init__
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils self.pkcs11 = pkcs11 or self._create_pkcs11(plugin_conf, ffi)
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils File "/usr/lib/python3.6/site-packages/barbican/plugin/crypto/p11_crypto.py", line 313, in _create_pkcs11
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils hmac_keywrap_mechanism=plugin_conf.hmac_keywrap_mechanism
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils File "/usr/lib/python3.6/site-packages/barbican/plugin/crypto/pkcs11.py", line 385, in __init__
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils self.lib = self.ffi.dlopen(library_path)
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils File "/usr/lib64/python3.6/site-packages/cffi/api.py", line 146, in dlopen
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils lib, function_cache = _make_ffi_library(self, name, flags)
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils File "/usr/lib64/python3.6/site-packages/cffi/api.py", line 828, in _make_ffi_library
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils backendlib = _load_backend_lib(backend, libname, flags)
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils File "/usr/lib64/python3.6/site-packages/cffi/api.py", line 823, in _load_backend_lib
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils raise OSError(msg)
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils OSError: cannot load library '/usr/lib/libCryptoki2_64.so': /usr/lib/libCryptoki2_64.so: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called '/usr/lib/libCryptoki2_64.so'
2021-10-12 08:49:42.901 39 ERROR barbican.plugin.util.utils
2021-10-12 08:49:42.902 39 ERROR barbican.tasks.resources [req-281008bb-60bf-47d7-8c91-8dcc663014cd 858532b836bc49f2bdf3dcbe5ac99b32 020026bd70b3418082b82a4c7ef8156d - a10b075299a1427c9baeff6550b1744e a10b075299a1427c9baeff6550b1744e] Could not perform processing for task 'Process TypeOrder'.: barbican.plugin.crypto.base.CryptoPluginNotFound: Crypto plugin not found.
2021-10-12 08:49:42.902 39 ERROR barbican.tasks.resources Traceback (most recent call last):
2021-10-12 08:49:42.902 39 ERROR barbican.tasks.resources File "/usr/lib/python3.6/site-packages/barbican/tasks/resources.py", line 100, in process
2021-10-12 08:49:42.902 39 ERROR barbican.tasks.resources result = self.handle_processing(entity, *args, **kwargs)
2021-10-12 08:49:42.902 39 ERROR barbican.tasks.resources File "/usr/lib/python3.6/site-packages/barbican/tasks/resources.py", line 247, in handle_processing
2021-10-12 08:49:42.902 39 ERROR barbican.tasks.resources return self.handle_order(order)
2021-10-12 08:49:42.902 39 ERROR barbican.tasks.resources File "/usr/lib/python3.6/site-packages/barbican/tasks/resources.py", line 281, in handle_order
2021-10-12 08:49:42.902 39 ERROR barbican.tasks.resources project
2021-10-12 08:49:42.902 39 ERROR barbican.tasks.resources File "/usr/lib/python3.6/site-packages/barbican/plugin/resources.py", line 181, in generate_secret
2021-10-12 08:49:42.902 39 ERROR barbican.tasks.resources generate_plugin, key_spec, secret_model, project_model, content_type)
2021-10-12 08:49:42.902 39 ERROR barbican.tasks.resources File "/usr/lib/python3.6/site-packages/barbican/plugin/resources.py", line 293, in _generate_symmetric_key
2021-10-12 08:49:42.902 39 ERROR barbican.tasks.resources key_spec, context)
2021-10-12 08:49:42.902 39 ERROR barbican.tasks.resources File "/usr/lib/python3.6/site-packages/barbican/plugin/store_crypto.py", line 168, in generate_symmetric_key
2021-10-12 08:49:42.902 39 ERROR barbican.tasks.resources project_id=context.project_model.id)
2021-10-12 08:49:42.902 39 ERROR barbican.tasks.resources File "/usr/lib/python3.6/site-packages/barbican/plugin/crypto/manager.py", line 93, in get_plugin_store_generate
2021-10-12 08:49:42.902 39 ERROR barbican.tasks.resources raise base.CryptoPluginNotFound()
2021-10-12 08:49:42.902 39 ERROR barbican.tasks.resources barbican.plugin.crypto.base.CryptoPluginNotFound: Crypto plugin not found.
2021-10-12 08:49:42.907 39 ERROR barbican.tasks.resources return self.process(*args, **kwargs)
2021-10-12 08:49:42.907 39 ERROR barbican.tasks.resources File "/usr/lib/python3.6/site-packages/barbican/tasks/resources.py", line 113, in process
2021-10-12 08:49:42.907 39 ERROR barbican.tasks.resources raise e_orig
2021-10-12 08:49:42.907 39 ERROR barbican.tasks.resources File "/usr/lib/python3.6/site-packages/barbican/api/__init__.py", line 98, in generate_safe_exception_message
2021-10-12 08:49:42.907 39 ERROR barbican.tasks.resources raise excep
2021-10-12 08:49:42.907 39 ERROR barbican.tasks.resources File "/usr/lib/python3.6/site-packages/barbican/tasks/resources.py", line 100, in process
2021-10-12 08:49:42.907 39 ERROR barbican.tasks.resources result = self.handle_processing(entity, *args, **kwargs)
2
2021-10-12 08:49:42.907 39 ERROR barbican.tasks.resources raise base.CryptoPluginNotFound()
2021-10-12 08:49:42.907 39 ERROR barbican.tasks.resources barbican.plugin.crypto.base.CryptoPluginNotFound: Crypto plugin not found.
2021-10-12 08:49:42.907 39 ERROR barbican.tasks.resources
2021-10-12 08:49:42.908 39 INFO barbican.queue.server [req-281008bb-60bf-47d7-8c91-8dcc663014cd 858532b836bc49f2bdf3dcbe5ac99b32 020026bd70b3418082b82a4c7ef8156d - a10b075299a1427c9baeff6550b1744e a10b075299a1427c9baeff6550b1744e] Task 'process_type_order' did not have to be retried
2021-10-12 08:49:42.908 39 INFO barbican.queue.server [req-281008bb-60bf-47d7-8c91-8dcc663014cd 858532b836bc49f2bdf3dcbe5ac99b32 020026bd70b3418082b82a4c7ef8156d - a10b075299a1427c9baeff6550b1744e a10b075299a1427c9baeff6550b1744e] Completed worker task: 'process_type_order'
2021-10-12 08:49:43.056 39 INFO barbican.api.middleware.context [req-281008bb-60bf-47d7-8c91-8dcc663014cd 858532b836bc49f2bdf3dcbe5ac99b32 020026bd70b3418082b82a4c7ef8156d - a10b075299a1427c9baeff6550b1744e a10b075299a1427c9baeff6550b1744e] Processed request: 202 Accepted - POST https://kolla-internal-victoria-centos-1.triliodata.demo:9311/v1/orders/
**Environment**:
* OS (e.g. from /etc/os-release): CentOS Linux release 8.4.2105
* Kernel (e.g. `uname -a`): Linux controller 4.18.0-240.22.1.el8_3.x86_64 #1 SMP Thu Apr 8 19:01:30 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
* Docker version if applicable (e.g. `docker version`): 20.10.8
* Kolla-Ansible version : 11.0.0
* Docker image Install type (source/binary): Binary
Same on 2023.1 - missing /usr/lib/ libCryptoki2_ 64.so