Merge "When we failed to load pkcs12 cert print warning"

This commit is contained in:
Zuul 2024-03-08 14:11:17 +00:00 committed by Gerrit Code Review
commit 2b8af0dc62
1 changed files with 4 additions and 1 deletions

View File

@ -120,7 +120,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.