Merge "When we failed to load pkcs12 cert print warning" into stable/2023.1

This commit is contained in:
Zuul 2024-06-06 15:06:31 +00:00 committed by Gerrit Code Review
commit ab7c7d6b4b
1 changed files with 4 additions and 1 deletions

View File

@ -115,7 +115,10 @@ class BarbicanCertManager(cert_mgr.CertManager):
return pkcs12.PKCS12Cert(cert_secret.payload)
except exceptions.UnreadablePKCS12:
raise
except Exception:
except Exception as e:
LOG.warning('Failed to load PKCS12Cert for secret %s with %s',
cert_ref, str(e))
LOG.warning('Falling back to the barbican_legacy implementation.')
# If our get fails, try with the legacy driver.
# TODO(rm_work): Remove this code when the deprecation cycle for
# the legacy driver is complete.