Currently if the SolidFire driver is configured but the cluster
isn't available for some reason the ensure_export call will raise
an unhandled exception and crash the volume-service.
We should be able to handle things like loosing connectivity to
a single back-end without impacting the other volume-service
backends.
We'll wrap the ensure_export call in a try block here and
return None in the case that the connection can't be made.
This will keep the service from crashing and log an error
message that the connection timed out.
Additional work would include adding a periodic retry task
to the manager to try and start the backend service for us
on some regular interval incase the device comes back.
Fixes: bug 1215064
Change-Id: Ice3f517d220c40113074bb77adbb10d5e32abd0b
def ensure_export(self, context, volume):
"""Verify the iscsi export info."""
LOG.debug(_("Executing SolidFire ensure_export..."))
- return self._do_export(volume)
+ try:
+ return self._do_export(volume)
+ except exception.SolidFireAPIException:
+ return None
def create_export(self, context, volume):
"""Setup the iscsi export info."""