Merge "rbd: Disable rbd stores if libraries are not available"

This commit is contained in:
Zuul 2023-02-22 17:30:50 +00:00 committed by Gerrit Code Review
commit 184fffe5a2
1 changed files with 7 additions and 0 deletions

View File

@ -318,6 +318,13 @@ class Store(driver.Store):
this method. If the store was not able to successfully configure
itself, it should raise `exceptions.BadStoreConfiguration`
"""
if rbd is None or rados is None:
reason = _("The required libraries(rbd and rados) are not "
"available")
LOG.error(reason)
raise exceptions.BadStoreConfiguration(store_name='rbd',
reason=reason)
try:
if self.backend_group:
chunk = getattr(self.conf,