[Bug 1799132] Re: vault_plugin: TypeError: 'NoneType' object is not subscriptable on secret_store operation
cronay walls
1799132 at bugs.launchpad.net
Thu Nov 7 04:35:31 UTC 2019
In general, the error means that you attempted to index an object that
doesn't have that functionality. You are trying to subscript an object
which you think is a list or dict, but actually is None. NoneType is the
type of the None object which represents a lack of value, for example, a
function that does not explicitly return a value will return None.
'NoneType' object is not subscriptable is the one thrown by python when
you use the square bracket notation object[key] where an object doesn't
define the __getitem__ method . e.g.: http://net-
informations.com/python/err/nonetype.htm
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to Ubuntu Cloud Archive.
https://bugs.launchpad.net/bugs/1799132
Title:
vault_plugin: TypeError: 'NoneType' object is not subscriptable on
secret_store operation
Status in castellan:
New
Status in Ubuntu Cloud Archive:
Triaged
Status in Ubuntu Cloud Archive rocky series:
Triaged
Status in python-castellan package in Ubuntu:
Triaged
Status in python-castellan source package in Cosmic:
Triaged
Status in python-castellan source package in Disco:
Triaged
Bug description:
Modified `castellan/key_manager/vault_key_manager.py` to get extra debug output below:
[Mon Oct 22 06:20:58.543811 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.543 5780 DEBUG barbican.model.repositories [req-04b83251-4b59-49ff-ad86-3af6eb98b9ec 6abd0959b63546d0bd4f4f4e5a84e485 b99281f6b15b453aa9140bf0622d689e - bb39d2073fa9418d9bb97897a7809a39 bb39d2073fa9418d9bb97897a7809a39] Getting session... get_session /usr/lib/python3/dist-packages/barbican/model/repositories.py:363\x1b[00m
[Mon Oct 22 06:20:58.605091 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] {'auth': None,
[Mon Oct 22 06:20:58.605138 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605395 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'data': {'accessor': 'kv_5b25ebdf',
[Mon Oct 22 06:20:58.605421 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605561 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'config': {'default_lease_ttl': 0,
[Mon Oct 22 06:20:58.605581 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605617 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'force_no_cache': False,
[Mon Oct 22 06:20:58.605638 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605674 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'max_lease_ttl': 0,
[Mon Oct 22 06:20:58.605688 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605730 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'plugin_name': ''},
[Mon Oct 22 06:20:58.605745 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605782 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'description': 'Charm created KV backend',
[Mon Oct 22 06:20:58.605816 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605851 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'local': False,
[Mon Oct 22 06:20:58.605864 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605899 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'options': None,
[Mon Oct 22 06:20:58.605913 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605948 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'path': 'charm-barbican-vault/',
[Mon Oct 22 06:20:58.605962 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.605996 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'seal_wrap': False,
[Mon Oct 22 06:20:58.606010 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.606050 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'type': 'kv'},
[Mon Oct 22 06:20:58.606063 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.606099 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'lease_duration': 0,
[Mon Oct 22 06:20:58.606113 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.606149 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'lease_id': '',
[Mon Oct 22 06:20:58.606163 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.606196 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'renewable': False,
[Mon Oct 22 06:20:58.606210 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.606246 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'request_id': '26a98ddc-d22d-04fa-b5ba-c78f9f264cfe',
[Mon Oct 22 06:20:58.606261 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.606295 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'warnings': None,
[Mon Oct 22 06:20:58.606309 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.606351 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 'wrap_info': None}
[Mon Oct 22 06:20:58.608802 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store [req-04b83251-4b59-49ff-ad86-3af6eb98b9ec 6abd0959b63546d0bd4f4f4e5a84e485 b99281f6b15b453aa9140bf0622d689e - bb39d2073fa9418d9bb97897a7809a39 bb39d2073fa9418d9bb97897a7809a39] Error storing secret: 'NoneType' object is not subscriptable: TypeError: 'NoneType' object is not subscriptable
[Mon Oct 22 06:20:58.608841 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store Traceback (most recent call last):
[Mon Oct 22 06:20:58.608854 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store File "/usr/lib/python3/dist-packages/barbican/plugin/castellan_secret_store.py", line 86, in store_secret
[Mon Oct 22 06:20:58.608863 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store opaque_data.OpaqueData(secret_dto.secret)
[Mon Oct 22 06:20:58.608872 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store File "/usr/lib/python3/dist-packages/castellan/key_manager/vault_key_manager.py", line 321, in store
[Mon Oct 22 06:20:58.608896 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store return self._store_key_value(key_id, key_value)
[Mon Oct 22 06:20:58.608907 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store File "/usr/lib/python3/dist-packages/castellan/key_manager/vault_key_manager.py", line 286, in _store_key_value
[Mon Oct 22 06:20:58.608916 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store if self._get_api_version() != '1':
[Mon Oct 22 06:20:58.608925 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store File "/usr/lib/python3/dist-packages/castellan/key_manager/vault_key_manager.py", line 134, in _get_api_version
[Mon Oct 22 06:20:58.608935 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store self._vault_kv_version = resp.json()['data']['options']['version']
[Mon Oct 22 06:20:58.608944 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store TypeError: 'NoneType' object is not subscriptable
[Mon Oct 22 06:20:58.608956 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.606 5780 ERROR barbican.plugin.castellan_secret_store \x1b[00m
[Mon Oct 22 06:20:58.608971 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372]
[Mon Oct 22 06:20:58.610925 2018] [wsgi:error] [pid 5780:tid 139629518890752] [remote 10.130.236.83:50372] 2018-10-22 06:20:58.609 5780 ERROR barbican.api.controllers [req-04b83251-4b59-49ff-ad86-3af6eb98b9ec 6abd0959b63546d0bd4f4f4e5a84e485 b99281f6b15b453aa9140bf0622d689e - bb39d2073fa9418d9bb97897a7809a39 bb39d2073fa9418d9bb97897a7809a39] Secret update failure seen - please contact site administrator.: barbican.plugin.interface.secret_store.SecretGeneralException: Problem seen during crypto processing - Reason: 'NoneType' object is not subscriptable
To manage notifications about this bug go to:
https://bugs.launchpad.net/castellan/+bug/1799132/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list