Unlock max_instances_per_host in controller config

PROD-35769

Change-Id: Ifd639dca8a59964ec5a3d5f9f12b63736c594505
diff --git a/README.rst b/README.rst
index 9acf16f..453efa2 100644
--- a/README.rst
+++ b/README.rst
@@ -1520,3 +1520,15 @@
          all: True
          verbose: True
          all_cells: True
+
+
+Configure filter schedulers
+---------------------------
+At this moment only max_instances_per_host for NumInstancesFilter is supported.
+
+.. code-block:: yaml
+
+    nova:
+      controller:
+        filter_scheduler:
+          max_instances_per_host: 50
diff --git a/nova/files/pike/nova-controller.conf.Debian b/nova/files/pike/nova-controller.conf.Debian
index b6e8633..d2d7693 100644
--- a/nova/files/pike/nova-controller.conf.Debian
+++ b/nova/files/pike/nova-controller.conf.Debian
@@ -4774,7 +4774,7 @@
 #  (integer value)
 # Deprecated group/name - [DEFAULT]/max_instances_per_host
 #max_instances_per_host=50
-max_instances_per_host=50
+max_instances_per_host = {{ controller.get('filter_scheduler',{}).get('max_instances_per_host', 50) }}
 
 #
 # Enable querying of individual hosts for instance information.
diff --git a/nova/files/queens/nova-controller.conf.Debian b/nova/files/queens/nova-controller.conf.Debian
index 4939a0e..17d0c4f 100644
--- a/nova/files/queens/nova-controller.conf.Debian
+++ b/nova/files/queens/nova-controller.conf.Debian
@@ -4725,7 +4725,7 @@
 #   scheduled on a host.
 #  (integer value)
 # Minimum value: 1
-max_instances_per_host = 50
+max_instances_per_host = {{ controller.get('filter_scheduler',{}).get('max_instances_per_host', 50) }}
 
 #
 # Enable querying of individual hosts for instance information.