From ecfd4d393a12b408b9961358841c70d20b476f49 Mon Sep 17 00:00:00 2001 From: Shunei Shiono Date: Thu, 26 Apr 2018 08:48:48 +0900 Subject: [PATCH] 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 --- .../tests/unit/volume/drivers/nec/test_volume.py | 14 +++++++++++++- cinder/volume/drivers/nec/volume_common.py | 1 - cinder/volume/drivers/nec/volume_helper.py | 3 +-- .../drivers/nec-storage-m-series-driver.rst | 3 ++- ...c-delete-volume-per-limit-d10b9df86f64b80e.yaml | 5 +++++ 5 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 releasenotes/notes/nec-delete-volume-per-limit-d10b9df86f64b80e.yaml diff --git a/cinder/tests/unit/volume/drivers/nec/test_volume.py b/cinder/tests/unit/volume/drivers/nec/test_volume.py index c75732489e4..346bb1418eb 100644 --- a/cinder/tests/unit/volume/drivers/nec/test_volume.py +++ b/cinder/tests/unit/volume/drivers/nec/test_volume.py @@ -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', diff --git a/cinder/volume/drivers/nec/volume_common.py b/cinder/volume/drivers/nec/volume_common.py index aa4bda67191..3f9fe1b1def 100644 --- a/cinder/volume/drivers/nec/volume_common.py +++ b/cinder/volume/drivers/nec/volume_common.py @@ -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) diff --git a/cinder/volume/drivers/nec/volume_helper.py b/cinder/volume/drivers/nec/volume_helper.py index df3b32c7df0..123b1132eea 100644 --- a/cinder/volume/drivers/nec/volume_helper.py +++ b/cinder/volume/drivers/nec/volume_helper.py @@ -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: diff --git a/doc/source/configuration/block-storage/drivers/nec-storage-m-series-driver.rst b/doc/source/configuration/block-storage/drivers/nec-storage-m-series-driver.rst index 3abaaa28c4e..8569ff1afc3 100644 --- a/doc/source/configuration/block-storage/drivers/nec-storage-m-series-driver.rst +++ b/doc/source/configuration/block-storage/drivers/nec-storage-m-series-driver.rst @@ -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 diff --git a/releasenotes/notes/nec-delete-volume-per-limit-d10b9df86f64b80e.yaml b/releasenotes/notes/nec-delete-volume-per-limit-d10b9df86f64b80e.yaml new file mode 100644 index 00000000000..4f43be25e3d --- /dev/null +++ b/releasenotes/notes/nec-delete-volume-per-limit-d10b9df86f64b80e.yaml @@ -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.