Merge "Fix HNAS driver crash with unmounted filesystems"
This commit is contained in:
commit
e9fc395802
|
@ -322,6 +322,8 @@ class HDSHNASDriver(driver.ShareDriver):
|
||||||
"""Updates the Capability of Backend."""
|
"""Updates the Capability of Backend."""
|
||||||
LOG.debug("Updating Backend Capability Information - HDS HNAS.")
|
LOG.debug("Updating Backend Capability Information - HDS HNAS.")
|
||||||
|
|
||||||
|
self._check_fs_mounted()
|
||||||
|
|
||||||
total_space, free_space = self.hnas.get_stats()
|
total_space, free_space = self.hnas.get_stats()
|
||||||
|
|
||||||
reserved = self.configuration.safe_get('reserved_share_percentage')
|
reserved = self.configuration.safe_get('reserved_share_percentage')
|
||||||
|
|
|
@ -498,6 +498,8 @@ class HDSHNASTestCase(test.TestCase):
|
||||||
|
|
||||||
self.mock_object(ssh.HNASSSHBackend, 'get_stats', mock.Mock(
|
self.mock_object(ssh.HNASSSHBackend, 'get_stats', mock.Mock(
|
||||||
return_value=(1000, 200)))
|
return_value=(1000, 200)))
|
||||||
|
self.mock_object(hds_hnas.HDSHNASDriver, "_check_fs_mounted",
|
||||||
|
mock.Mock())
|
||||||
self.mock_object(manila.share.driver.ShareDriver,
|
self.mock_object(manila.share.driver.ShareDriver,
|
||||||
'_update_share_stats', mock.Mock())
|
'_update_share_stats', mock.Mock())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue