From b51945a05fa72cecbf4946101e24fd1da4a20c04 Mon Sep 17 00:00:00 2001 From: sreeteja Date: Tue, 11 Jul 2017 12:28:56 +0530 Subject: [PATCH] Removal of max_instances config parameter There is a NumInstancesFilter which can be used to filter the number of instances that are supposed to be launched on the host this replaces the work that is planned for max_instances config parameter to perform. It is removed as the main functionality of this parameter is not yet implemented in the code. Change-Id: Ie545a5f74f7b63ea56812577c201fcb443014998 --- devstack/local.conf.singlenode.nova_neutron_storage | 1 - devstack/plugin.sh | 1 - devstack/settings | 1 - nova_dpm/conf/dpm.py | 8 -------- nova_dpm/tests/unit/conf/test_dpm.py | 8 -------- ...nfig-max_instances-default-value-7e530d2ae32c4c44.yaml | 7 ------- .../config-max_instances-removed-7fb30507f0348427.yaml | 6 ++++++ 7 files changed, 6 insertions(+), 26 deletions(-) delete mode 100644 releasenotes/notes/config-max_instances-default-value-7e530d2ae32c4c44.yaml create mode 100644 releasenotes/notes/config-max_instances-removed-7fb30507f0348427.yaml diff --git a/devstack/local.conf.singlenode.nova_neutron_storage b/devstack/local.conf.singlenode.nova_neutron_storage index 25a3646..0639134 100644 --- a/devstack/local.conf.singlenode.nova_neutron_storage +++ b/devstack/local.conf.singlenode.nova_neutron_storage @@ -48,7 +48,6 @@ CPC_OBJECT_ID= [DEFAULT] host = foo [dpm] -max_instances = max_memory = max_processors = cpc_object_id = $CPC_OBJECT_ID diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 3018613..823d077 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -57,7 +57,6 @@ function configure_nova_dpm { iniset $NOVA_CONF dpm cpc_object_id $CPC_OBJECT_ID iniset $NOVA_CONF dpm max_processors $MAX_PROC iniset $NOVA_CONF dpm max_memory $MAX_MEM - iniset $NOVA_CONF dpm max_instances $MAX_INSTANCES } # install_nova_dpm() - Install nova_dpm and necessary dependencies diff --git a/devstack/settings b/devstack/settings index 4d0302c..195e34b 100644 --- a/devstack/settings +++ b/devstack/settings @@ -17,4 +17,3 @@ HMC_PASSWORD=$HMC_PASSWORD CPC_OBJECT_ID=$CPC_OBJECT_ID MAX_PROC=$MAX_PROC MAX_MEM=$MAX_MEM -MAX_INSTANCES=$MAX_INSTANCES diff --git a/nova_dpm/conf/dpm.py b/nova_dpm/conf/dpm.py index 4f23c22..97b6892 100644 --- a/nova_dpm/conf/dpm.py +++ b/nova_dpm/conf/dpm.py @@ -34,14 +34,6 @@ ALL_DPM_OPTS = [ cfg.IntOpt('max_memory', min=512, help=""" Maximum amount of memory (in MiB) on the target CPC that can be used for this OpenStack hypervisor host"""), - cfg.IntOpt('max_instances', default=-1, min=-1, help=""" - Maximum number of instances (partitions) that can be created for this - OpenStack hypervisor host. Valid values are: - -1: The number of instances is only limited by the - number of free partitions on this CPC - 0: A technically valid upper bound but useless. - >0: If this value is reached, - this host won't be able to spawn new instances."""), MultiStorageAdapterMappingOpt('physical_storage_adapter_mappings', help=""" Physical storage adapter with port details for hba creation"""), cfg.ListOpt('target_wwpn_ignore_list', default='', help=""" diff --git a/nova_dpm/tests/unit/conf/test_dpm.py b/nova_dpm/tests/unit/conf/test_dpm.py index c9ca2f2..784246f 100644 --- a/nova_dpm/tests/unit/conf/test_dpm.py +++ b/nova_dpm/tests/unit/conf/test_dpm.py @@ -23,14 +23,6 @@ class TestConfigParameters(TestCase): super(TestConfigParameters, self).setUp() self.CONF = nova_dpm.conf.CONF - def test_default_value(self): - max_instance = self.CONF.dpm.max_instances - self.assertEqual(-1, max_instance) - - def test_min_value(self): - self.assertRaises(ValueError, self.CONF.set_override, "max_instances", - -2, group="dpm") - def test_max_memory_min_value(self): self.assertRaises(ValueError, self.CONF.set_override, "max_memory", 500, group="dpm") diff --git a/releasenotes/notes/config-max_instances-default-value-7e530d2ae32c4c44.yaml b/releasenotes/notes/config-max_instances-default-value-7e530d2ae32c4c44.yaml deleted file mode 100644 index 8540212..0000000 --- a/releasenotes/notes/config-max_instances-default-value-7e530d2ae32c4c44.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -upgrade: - - | - Default value of -1 has been set for the configuration option - ``max_instances``. This means that by default, there is no upper - limit set on the maximum number of instances that can be created for - this host. diff --git a/releasenotes/notes/config-max_instances-removed-7fb30507f0348427.yaml b/releasenotes/notes/config-max_instances-removed-7fb30507f0348427.yaml new file mode 100644 index 0000000..d2015d9 --- /dev/null +++ b/releasenotes/notes/config-max_instances-removed-7fb30507f0348427.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - The max_instances config parameter is removed as + NumInstancesFilter is used inorder to filter the + number of instances on each host. +