Skip to content

Commit a5cf4ae

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Clean up NumInstancesFilter related docs"
2 parents ce6e0ef + b4659c9 commit a5cf4ae

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

doc/source/user/filter-scheduler.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,10 @@ There are many standard filter classes which may be used
131131
If more than one value is found for a host (meaning the host is in two or more
132132
different aggregates with different ratio settings), the minimum value will
133133
be used.
134-
* |NumInstancesFilter| - filters compute nodes by number of running instances.
135-
Nodes with too many instances will be filtered.
136-
:oslo.config:option:`filter_scheduler.max_instances_per_host` setting.
137-
Maximum number of instances allowed to run on this host. The host will be
134+
* |NumInstancesFilter| - filters compute nodes by number of instances.
135+
Nodes with too many instances will be filtered. The host will be
138136
ignored by the scheduler if more than
139-
:oslo.config:option:`filter_scheduler.max_instances_per_host` already exists
137+
:oslo.config:option:`filter_scheduler.max_instances_per_host` already exist
140138
on the host.
141139
* |AggregateNumInstancesFilter| - filters hosts by number of instances with
142140
per-aggregate :oslo.config:option:`filter_scheduler.max_instances_per_host`
@@ -197,7 +195,10 @@ There are many standard filter classes which may be used
197195

198196
Now we can focus on these standard filter classes in some detail. Some filters
199197
such as |AllHostsFilter| and |NumInstancesFilter| are relatively simple and can be
200-
understood from the code. For example, |NumInstancesFilter| has the following implementation::
198+
understood from the code. For example, |NumInstancesFilter| has the following
199+
implementation:
200+
201+
.. code-block:: python
201202
202203
class NumInstancesFilter(filters.BaseHostFilter):
203204
"""Filter out hosts with too many instances."""
@@ -212,7 +213,7 @@ understood from the code. For example, |NumInstancesFilter| has the following im
212213
return passes
213214
214215
Here :oslo.config:option:`filter_scheduler.max_instances_per_host` means the
215-
maximum number of instances that be active on a host.
216+
maximum number of instances that can be on a host.
216217

217218
The |AvailabilityZoneFilter| looks at the availability zone of compute node
218219
and availability zone from the properties of the request. Each compute service

nova/conf/scheduler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@
239239
min=1,
240240
deprecated_group="DEFAULT",
241241
help="""
242-
Maximum number of instances that be active on a host.
242+
Maximum number of instances that can exist on a host.
243243
244244
If you need to limit the number of instances on any given host, set this option
245245
to the maximum number of instances you want to allow. The NumInstancesFilter
@@ -248,8 +248,8 @@
248248
249249
This option is only used by the FilterScheduler and its subclasses; if you use
250250
a different scheduler, this option has no effect. Also note that this setting
251-
only affects scheduling if the 'NumInstancesFilter' or
252-
'AggregateNumInstancesFilter' filter is enabled.
251+
only affects scheduling if the ``NumInstancesFilter`` or
252+
``AggregateNumInstancesFilter`` filter is enabled.
253253
254254
Possible values:
255255

0 commit comments

Comments
 (0)