Merge "cinder: Disable cinder stores if cinderclient is not installed"

This commit is contained in:
Zuul
2023-02-22 22:00:25 +00:00
committed by Gerrit Code Review

View File

@@ -514,6 +514,12 @@ class Store(glance_store.driver.Store):
Check to verify if the volume types configured for the cinder store
exist in deployment and if not, log a warning.
"""
if cinderclient is None:
reason = _("cinderclient is not available.")
LOG.error(reason)
raise exceptions.BadStoreConfiguration(store_name="cinder",
reason=reason)
cinder_volume_type = self.store_conf.cinder_volume_type
if cinder_volume_type:
# NOTE: `cinder_volume_type` is configured, check