Skip to content

Commit

Permalink
Handle ECONNREFUSED exception in SolidFire driver.
Browse files Browse the repository at this point in the history
The SolidFire driver wasn't handling connection exceptions
during init (capacity updates from scheduler).

This patch add a try/except wrap around the two places
that this is called and logs and error rather than crashing
cinder-volume service.

Fixes bug: 1195910

Change-Id: I30347cc0973bbf9dbc30ea02e204560095fc75b4
  • Loading branch information
j-griffith committed Jun 28, 2013
1 parent 066a676 commit d596bfe
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions cinder/volume/drivers/solidfire.py
Expand Up @@ -85,7 +85,12 @@ class SolidFire(SanISCSIDriver):
def __init__(self, *args, **kwargs):
super(SolidFire, self).__init__(*args, **kwargs)
self.configuration.append_config_values(sf_opts)
self._update_cluster_status()
try:
self._update_cluster_status()
except Exception as ex:
LOG.error(_("Update SolidFire Cluster stats failed: %s"),
ex.strerror)
pass

def _issue_api_request(self, method_name, params):
"""All API requests to SolidFire device go through this method.
Expand Down Expand Up @@ -566,7 +571,12 @@ def get_volume_stats(self, refresh=False):
data
"""
if refresh:
self._update_cluster_status()
try:
self._update_cluster_status()
except Exception as ex:
LOG.error(_("Update SolidFire Cluster stats failed: %s"),
ex.strerror)
pass

return self.cluster_stats

Expand Down

0 comments on commit d596bfe

Please sign in to comment.