Update NexentaStor5 driver

- Disable SmartCompression feature for NFS backend. Thick provisioned
  volumes created as files containing zeros are not being compressed
  with standard compression if SmartCompression feature is enabled.
  This functionality will be fixed in a later release.
- Update driver features.
- Update default REST API port.
- Update recommended NFS options.

Change-Id: Icc509ce074d17ee073c58c43d98215fef5ad55c3
This commit is contained in:
Alex Deiter 2019-07-07 23:57:22 +00:00
parent 0e6d77e497
commit 3c8fbb9566
4 changed files with 79 additions and 5 deletions

View File

@ -102,6 +102,7 @@ class TestNexentaNfsDriver(test.TestCase):
get_filesystem.return_value = { get_filesystem.return_value = {
'mountPoint': '/path/to/volume', 'mountPoint': '/path/to/volume',
'nonBlockingMandatoryMode': False, 'nonBlockingMandatoryMode': False,
'smartCompression': False,
'isMounted': True 'isMounted': True
} }
get_service.return_value = { get_service.return_value = {
@ -112,18 +113,59 @@ class TestNexentaNfsDriver(test.TestCase):
} }
self.assertIsNone(self.drv.check_for_setup_error()) self.assertIsNone(self.drv.check_for_setup_error())
get_filesystem.assert_called_with(self.drv.root_path) get_filesystem.assert_called_with(self.drv.root_path)
set_filesystem.assert_not_called()
get_service.assert_called_with('nfs') get_service.assert_called_with('nfs')
get_nfs.assert_called_with(self.drv.root_path) get_nfs.assert_called_with(self.drv.root_path)
get_filesystem.return_value = { get_filesystem.return_value = {
'mountPoint': '/path/to/volume', 'mountPoint': '/path/to/volume',
'nonBlockingMandatoryMode': True, 'nonBlockingMandatoryMode': True,
'smartCompression': True,
'isMounted': True 'isMounted': True
} }
set_filesystem.return_value = {} set_filesystem.return_value = {}
payload = {
'nonBlockingMandatoryMode': False,
'smartCompression': False
}
self.assertIsNone(self.drv.check_for_setup_error()) self.assertIsNone(self.drv.check_for_setup_error())
get_filesystem.assert_called_with(self.drv.root_path)
set_filesystem.assert_called_with(self.drv.root_path, payload)
get_service.assert_called_with('nfs')
get_nfs.assert_called_with(self.drv.root_path)
get_filesystem.return_value = {
'mountPoint': '/path/to/volume',
'nonBlockingMandatoryMode': False,
'smartCompression': True,
'isMounted': True
}
payload = {
'smartCompression': False
}
set_filesystem.return_value = {}
self.assertIsNone(self.drv.check_for_setup_error())
get_filesystem.assert_called_with(self.drv.root_path)
set_filesystem.assert_called_with(self.drv.root_path, payload)
get_service.assert_called_with('nfs')
get_nfs.assert_called_with(self.drv.root_path)
get_filesystem.return_value = {
'mountPoint': '/path/to/volume',
'nonBlockingMandatoryMode': True,
'smartCompression': False,
'isMounted': True
}
payload = {
'nonBlockingMandatoryMode': False
}
set_filesystem.return_value = {}
self.assertIsNone(self.drv.check_for_setup_error())
get_filesystem.assert_called_with(self.drv.root_path)
set_filesystem.assert_called_with(self.drv.root_path, payload)
get_service.assert_called_with('nfs')
get_nfs.assert_called_with(self.drv.root_path)
get_filesystem.return_value = { get_filesystem.return_value = {
'mountPoint': 'none', 'mountPoint': 'none',
'nonBlockingMandatoryMode': False, 'nonBlockingMandatoryMode': False,
'smartCompression': False,
'isMounted': False 'isMounted': False
} }
self.assertRaises(jsonrpc.NefException, self.assertRaises(jsonrpc.NefException,
@ -131,6 +173,7 @@ class TestNexentaNfsDriver(test.TestCase):
get_filesystem.return_value = { get_filesystem.return_value = {
'mountPoint': '/path/to/volume', 'mountPoint': '/path/to/volume',
'nonBlockingMandatoryMode': False, 'nonBlockingMandatoryMode': False,
'smartCompression': False,
'isMounted': False 'isMounted': False
} }
self.assertRaises(jsonrpc.NefException, self.assertRaises(jsonrpc.NefException,

View File

@ -80,6 +80,7 @@ class NexentaNfsDriver(nfs.NfsDriver):
1.8.1 - Support for NexentaStor tenants. 1.8.1 - Support for NexentaStor tenants.
1.8.2 - Added manage/unmanage/manageable-list volume/snapshot support. 1.8.2 - Added manage/unmanage/manageable-list volume/snapshot support.
1.8.3 - Added consistency group capability to generic volume group. 1.8.3 - Added consistency group capability to generic volume group.
1.8.4 - Disabled SmartCompression feature.
""" """
VERSION = '1.8.3' VERSION = '1.8.3'
@ -146,8 +147,12 @@ class NexentaNfsDriver(nfs.NfsDriver):
message = (_('NFS root filesystem %(path)s is not mounted') message = (_('NFS root filesystem %(path)s is not mounted')
% {'path': filesystem['mountPoint']}) % {'path': filesystem['mountPoint']})
raise jsonrpc.NefException(code='ENOTDIR', message=message) raise jsonrpc.NefException(code='ENOTDIR', message=message)
payload = {}
if filesystem['nonBlockingMandatoryMode']: if filesystem['nonBlockingMandatoryMode']:
payload = {'nonBlockingMandatoryMode': False} payload['nonBlockingMandatoryMode'] = False
if filesystem['smartCompression']:
payload['smartCompression'] = False
if payload:
self.nef.filesystems.set(self.root_path, payload) self.nef.filesystems.set(self.root_path, payload)
service = self.nef.services.get('nfs') service = self.nef.services.get('nfs')
if service['state'] != 'online': if service['state'] != 'online':

View File

@ -32,6 +32,25 @@ Supported operations
* Change volume type. * Change volume type.
* Get volume statistics.
* Revert a volume to a snapshot.
* Manage and unmanage volumes and snapshots.
* List manageable volumes and snapshots.
* Create, modify, delete, and list consistency groups.
* Create, modify, delete, and list snapshots of consistency groups.
* Create consistency group from consistency group or consistency group
snapshot.
* Support consistency groups capability to generic volume groups.
* Attach a volume to multiple servers simultaneously (multiattach).
iSCSI driver iSCSI driver
~~~~~~~~~~~~ ~~~~~~~~~~~~
@ -59,7 +78,7 @@ volume driver controls:
nexenta_host=HOST-IP nexenta_host=HOST-IP
# Port for Rest API (integer value) # Port for Rest API (integer value)
nexenta_rest_port=8080 nexenta_rest_port=8443
# Username for NexentaStor Rest (string value) # Username for NexentaStor Rest (string value)
nexenta_user=USERNAME nexenta_user=USERNAME
@ -115,13 +134,13 @@ volume driver controls:
nas_host=HOST-IP nas_host=HOST-IP
# Port for Rest API (integer value) # Port for Rest API (integer value)
nexenta_rest_port=8080 nexenta_rest_port=8443
# Path to parent filesystem (string value) # Path to parent filesystem (string value)
nas_share_path=POOL/FILESYSTEM nas_share_path=POOL/FILESYSTEM
# Specify NFS version # Recommended NFS options
nas_mount_options=vers=4 nas_mount_options=vers=3,minorversion=0,timeo=100,nolock
#. Create filesystem on appliance and share via NFS. For example: #. Create filesystem on appliance and share via NFS. For example:

View File

@ -0,0 +1,7 @@
---
issues:
- |
SmartCompression feature is disabled for the NexentaStor5 NFS driver.
Thick provisioned volumes created as files containing zeros are not
being compressed with standard compression if SmartCompression feature
is enabled. This functionality will be fixed in a later release.