get_chain() function can raise TypeError
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vault-charm |
New
|
Undecided
|
Unassigned |
Bug Description
Unfortunately I don't have steps to reproduce this consistently. It happened to me when vault units were changing leadership.
Traceback (most recent call last):
File "/var/lib/
bus.
File "/var/lib/
_invoke(
File "/var/lib/
handler.
File "/var/lib/
self.
File "/var/lib/
chain = vault_pki.
File "/var/lib/
return client.
TypeError: 'NoneType' object is not subscriptable
I think that either the docstring of the function should be changed to indicate that this exception can be raised by the function (right now the docstring is copy-pasted from is_ca_ready()), or ideally the function should catch the exception and return appropriate value (None, "" ?)