The way this code is currently structured, if
self.driver.remove_export() raises an exception, you see the
error message logged for that but the original exception
from initialize_connection() never gets logged.
Change-Id: I454c73e8fdc88e5a9542369a5bca33f29617f013
try:
conn_info = self.driver.initialize_connection(volume, connector)
except Exception as err:
- self.driver.remove_export(context, volume)
err_msg = (_('Unable to fetch connection information from '
'backend: %(err)s') % {'err': err})
LOG.error(err_msg)
+
+ self.driver.remove_export(context, volume)
+
raise exception.VolumeBackendAPIException(data=err_msg)
# Add qos_specs to connection info