Merge "Fix HNAS driver crash with unmounted filesystems"

This commit is contained in:
Jenkins 2016-03-10 15:20:44 +00:00 committed by Gerrit Code Review
commit e9fc395802
2 changed files with 4 additions and 0 deletions

View File

@ -322,6 +322,8 @@ class HDSHNASDriver(driver.ShareDriver):
"""Updates the Capability of Backend."""
LOG.debug("Updating Backend Capability Information - HDS HNAS.")
self._check_fs_mounted()
total_space, free_space = self.hnas.get_stats()
reserved = self.configuration.safe_get('reserved_share_percentage')

View File

@ -498,6 +498,8 @@ class HDSHNASTestCase(test.TestCase):
self.mock_object(ssh.HNASSSHBackend, 'get_stats', mock.Mock(
return_value=(1000, 200)))
self.mock_object(hds_hnas.HDSHNASDriver, "_check_fs_mounted",
mock.Mock())
self.mock_object(manila.share.driver.ShareDriver,
'_update_share_stats', mock.Mock())