barbican/barbican
Douglas Mendizábal e7a714bd1f Ignore network errors during C_Finalize
The Trustway Proteccio HSM can somtimes return a network error when
attempting to finalize the cryptoki library.

The error can prevent reinitialization because we attempt to finalize
the library before initalizing a new connection.  When a network error
occurrs, barbican gets stuck in an error loop trying to finalize the
dead connection before starting a new one.

This patch adds code to ignore the network error when finalizing to
ensure we are able to attempt to reinitialize.

Connection errors during other operations will still result in 500
errors as expected.

Change-Id: I9ac6c7bbda0f81cb26e1c589803317df1ef11f39
(cherry picked from commit 70aac1f698)
(cherry picked from commit 1b6cf81c23)
(cherry picked from commit 2792aca796)
(cherry picked from commit 238b72caca)
2021-10-18 21:16:36 +00:00
..
api Update json module to jsonutils 2019-03-07 07:02:48 +00:00
cmd Allow multiple token labels for PKCS#11 driver 2021-03-09 16:35:23 +00:00
common Ignore network errors during C_Finalize 2021-10-18 21:16:36 +00:00
hacking Remove log translation related check 2017-03-30 09:25:20 +08:00
locale Imported Translations from Zanata 2019-04-13 07:42:42 +00:00
model Address race condition in KEKDatum 2019-01-24 22:55:21 -05:00
objects Update json module to jsonutils 2019-03-07 07:02:48 +00:00
plugin Ignore network errors during C_Finalize 2021-10-18 21:16:36 +00:00
queue Update the periodic_task link for retry_scheduler 2018-07-05 13:32:56 -04:00
tasks Remove translation of log messages 2017-06-03 10:18:55 +07:00
tests Ignore network errors during C_Finalize 2021-10-18 21:16:36 +00:00
__init__.py Files with no code must be left completely empty 2016-11-17 14:19:47 +08:00
context.py Enforce usage of oslo.context's project_id 2018-04-23 17:37:52 +03:00
i18n.py Remove translation logging prefixes from i18n 2017-06-08 03:13:19 +00:00
version.py Enable tag-based full version reporting via pbr 2014-01-22 18:01:30 -06:00