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
This commit is contained in:
sreeteja 2017-07-11 12:28:56 +05:30
parent 21916e7095
commit b51945a05f
7 changed files with 6 additions and 26 deletions

View File

@ -48,7 +48,6 @@ CPC_OBJECT_ID=<cpc-object-id>
[DEFAULT]
host = foo
[dpm]
max_instances = <max-allowed-instances-count>
max_memory = <max-available-memory>
max_processors = <max-avaialable-processor>
cpc_object_id = $CPC_OBJECT_ID

View File

@ -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

View File

@ -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

View File

@ -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="""

View File

@ -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")

View File

@ -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.

View File

@ -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.