summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2023-02-22 17:30:50 +0000
committerGerrit Code Review <review@openstack.org>2023-02-22 17:30:50 +0000
commit184fffe5a2345b5923b6df1d18ae968654bcc840 (patch)
tree640cd2a201e86148a2af012cdde9e42908ffaaca
parent7dc94f7a85e976a9c66f997f944c6ede06d7984a (diff)
parentea5bab9b577b9ff2c9cf1a14f21a0a4873379212 (diff)
downloadglance_store-184fffe5a2345b5923b6df1d18ae968654bcc840.tar.gz
Merge "rbd: Disable rbd stores if libraries are not available"
-rw-r--r--glance_store/_drivers/rbd.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/glance_store/_drivers/rbd.py b/glance_store/_drivers/rbd.py
index a9409e9..f45a909 100644
--- a/glance_store/_drivers/rbd.py
+++ b/glance_store/_drivers/rbd.py
@@ -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,