NEC driver: Delete max volumes per pool limit.

Currently, the max number of volumes (logical disks) per pool is
limited to 1024.
The limitation is eliminated in new firmware of NEC Storage.
This patch deletes the limitation.

Change-Id: I0c5a06714725eb2b2e6eb689fe4be9990aa3707b
This commit is contained in:
Shunei Shiono 2018-04-26 08:48:48 +09:00
parent aaac96102f
commit ecfd4d393a
5 changed files with 21 additions and 5 deletions

View File

@ -443,7 +443,16 @@ class NominatePoolLDTest(volume_helper.MStorageDSVDriver, test.TestCase):
self.used_ldns,
self.hostports,
self.max_ld_count) = self.configs(self.xml)
self._numofld_per_pool = 1024
pool_data = {'pool_num': 1,
'total': 1,
'free': 1,
'ld_list': []}
volume = {'id': 'X'}
self.test_pools = []
for var in range(0, 1025):
pool_data['ld_list'].append(volume)
self.test_pools = [pool_data]
def test_getxml(self):
self.assertIsNotNone(self.xml, "iSMview xml should not be None")
@ -466,6 +475,9 @@ class NominatePoolLDTest(volume_helper.MStorageDSVDriver, test.TestCase):
self.pools,
self.xml)
def test_return_poolnumber(self):
self.assertEqual(1, self._return_poolnumber(self.test_pools))
@mock.patch('cinder.volume.drivers.nec.cli.MStorageISMCLI._execute',
patch_execute)
@mock.patch('cinder.volume.drivers.nec.cli.MStorageISMCLI.view_all',

View File

@ -180,7 +180,6 @@ class MStorageVolumeCommon(object):
self._configuration = configuration
self._host = host
self._driver_name = driver_name
self._numofld_per_pool = 1024
self._configuration.append_config_values(mstorage_opts)
self._configuration.append_config_values(san.san_opts)

View File

@ -68,8 +68,7 @@ class MStorageDriver(volume_common.MStorageVolumeCommon):
min_ldn = 0
for pool in nominated_pools:
nld = len(pool['ld_list'])
if (nld < self._numofld_per_pool and
(selected_pool == -1 or min_ldn > nld)):
if selected_pool == -1 or min_ldn > nld:
selected_pool = pool['pool_num']
min_ldn = nld
if selected_pool < 0:

View File

@ -15,7 +15,8 @@ Supported models:
Requirements:
- Storage control software (firmware) revision 0950 or later
- Storage control software (firmware) revision 0950 or later (1015
or later is required to create more than 1024 volumes in a pool)
- NEC Storage DynamicDataReplication license
- (Optional) NEC Storage IO Load Manager license for QoS

View File

@ -0,0 +1,5 @@
---
upgrade:
- In NEC driver, the number of volumes in a storage pool is
no longer limited to 1024. More volumes can be created with
storage firmware revision 1015 or later.