diff options
author | Zuul <zuul@review.opendev.org> | 2023-02-22 17:30:50 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2023-02-22 17:30:50 +0000 |
commit | 184fffe5a2345b5923b6df1d18ae968654bcc840 (patch) | |
tree | 640cd2a201e86148a2af012cdde9e42908ffaaca /glance_store/_drivers/rbd.py | |
parent | 7dc94f7a85e976a9c66f997f944c6ede06d7984a (diff) | |
parent | ea5bab9b577b9ff2c9cf1a14f21a0a4873379212 (diff) | |
download | glance_store-184fffe5a2345b5923b6df1d18ae968654bcc840.tar.gz |
Merge "rbd: Disable rbd stores if libraries are not available"
Diffstat (limited to 'glance_store/_drivers/rbd.py')
-rw-r--r-- | glance_store/_drivers/rbd.py | 7 |
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, |