Update the usage of unscoped extra specs

Although the unscoped extra specs are supported in
AggregateInstanceExtraSpecsFilter and ComputeCapabilitiesFilter, it
should be not encouraged, since it will cause conflict.

Closes-Bug: 1330962
Change-Id: I2b35bf85f0c2e8c8c386bf0c4bed1e6c21cea453
This commit is contained in:
Yunhong Jiang 2014-06-20 11:14:06 -07:00
parent 38ae296fd0
commit 7e7cb4d0ec

View File

@ -6,30 +6,30 @@
<section xml:id="section_compute-scheduler" <section xml:id="section_compute-scheduler"
xmlns="http://docbook.org/ns/docbook" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.0">
version="5.0">
<?dbhtml stop-chunking?> <?dbhtml stop-chunking?>
<title>Scheduling</title> <title>Scheduling</title>
<para>Compute uses the <systemitem class="service" <para>Compute uses the <systemitem class="service"
>nova-scheduler</systemitem> service to determine how to >nova-scheduler</systemitem> service to determine how to
dispatch compute and volume requests. For example, the dispatch compute and volume requests. For example, the
<systemitem class="service">nova-scheduler</systemitem> <systemitem class="service">nova-scheduler</systemitem>
service determines which host a VM should launch on. The term service determines on which host a VM should launch. In the
<firstterm>host</firstterm> in the context of filters context of filters, the term <firstterm>host</firstterm> means
means a physical node that has a <systemitem class="service" a physical node that has a <systemitem class="service"
>nova-compute</systemitem> service running on it. You can >nova-compute</systemitem> service running on it. You can
configure the scheduler through a variety of options.</para> configure the scheduler through a variety of options.</para>
<para>Compute is configured with the following default scheduler options in the <para>Compute is configured with the following default scheduler
<filename>/etc/nova/nova.conf</filename> file:</para> options in the <filename>/etc/nova/nova.conf</filename>
file:</para>
<programlisting language="ini">scheduler_driver=nova.scheduler.multi.MultiScheduler <programlisting language="ini">scheduler_driver=nova.scheduler.multi.MultiScheduler
scheduler_driver_task_period=60 scheduler_driver_task_period=60
compute_scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler compute_scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler
scheduler_available_filters=nova.scheduler.filters.all_filters scheduler_available_filters=nova.scheduler.filters.all_filters
scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter</programlisting> scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter</programlisting>
<para>By default, the scheduler_driver is configured as a filter <para>By default, the <parameter>scheduler_driver</parameter> is
scheduler, as described in the next section. In the default configured as a filter scheduler, as described in the next
configuration, this scheduler considers hosts that meet all section. In the default configuration, this scheduler
the following criteria:</para> considers hosts that meet all the following criteria:</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>Have not been attempted for scheduling purposes <para>Have not been attempted for scheduling purposes
@ -44,7 +44,7 @@ scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFi
(<literal>RamFilter</literal>).</para> (<literal>RamFilter</literal>).</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Capable of servicing the request <para>Can service the request
(<literal>ComputeFilter</literal>).</para> (<literal>ComputeFilter</literal>).</para>
</listitem> </listitem>
<listitem> <listitem>
@ -59,30 +59,31 @@ scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFi
(<literal>ImagePropertiesFilter</literal>).</para> (<literal>ImagePropertiesFilter</literal>).</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<para>The scheduler caches its list of available hosts; you can <para>The scheduler caches its list of available hosts; use the
specify how often the list is updated by modifying the <option>scheduler_driver_task_period</option> option to
<option>scheduler_driver_task_period</option> value. specify how often the list is updated.</para>
</para>
<note> <note>
<para>Do not configure <option>service_down_time</option> to be <para>Do not configure <option>service_down_time</option> to
much smaller than <option>scheduler_driver_task_period</option>; be much smaller than
otherwise, hosts will appear to be dead while the host list is <option>scheduler_driver_task_period</option>;
being cached.</para> otherwise, hosts appear to be dead while the host list is
being cached.</para>
</note> </note>
<para>For information on the volume scheduler, refer the Block <para>For information about the volume scheduler, see the Block
Storage section of <link Storage section of <link
xlink:href="http://docs.openstack.org/admin-guide-cloud/content/managing-volumes.html"> xlink:href="http://docs.openstack.org/admin-guide-cloud/content/managing-volumes.html">
<citetitle>OpenStack Cloud Administrator <citetitle>OpenStack Cloud Administrator
Guide</citetitle></link> for information.</para> Guide</citetitle></link>.</para>
<para>The choice of a new host on instance migration is done by the <para>The scheduler chooses a new host when an instance is
scheduler.</para> migrated.</para>
<para>When evacuating instances from a host, the scheduler service does not <para>When evacuating instances from a host, the scheduler service
pick the next host. Instances are evacuated to the host explicitly does not pick the next host. Instances are evacuated to the
defined by the administrator. For information about instance evacuation, host explicitly defined by the administrator. For information
refer to the <link about instance evacuation, see <link
xlink:href="http://docs.openstack.org/admin-guide-cloud/content/nova_cli_evacuate.html">Evacuate xlink:href="http://docs.openstack.org/admin-guide-cloud/content/nova_cli_evacuate.html"
instances</link> section of the <citetitle>Cloud Administrator Guide</citetitle>.</para> >Evacuate instances</link> section of the
<citetitle>OpenStack Cloud Administrator
Guide</citetitle>.</para>
<section xml:id="filter-scheduler"> <section xml:id="filter-scheduler">
<title>Filter scheduler</title> <title>Filter scheduler</title>
<para>The Filter Scheduler <para>The Filter Scheduler
@ -102,18 +103,17 @@ scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFi
the filter, or it is rejected. Hosts that are accepted by the filter, or it is rejected. Hosts that are accepted by
the filter are then processed by a different algorithm to the filter are then processed by a different algorithm to
decide which hosts to use for that request, described in decide which hosts to use for that request, described in
the <link linkend="weights">Weights</link> section. the <link linkend="weights">Weights</link> section.</para>
<figure xml:id="filter-figure"> <figure xml:id="filter-figure">
<title>Filtering</title> <title>Filtering</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata <imagedata
fileref="../../common/figures/filteringWorkflow1.png" fileref="../../common/figures/filteringWorkflow1.png"
scale="80"/> scale="80"/>
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>
</para>
<para>The <option>scheduler_available_filters</option> <para>The <option>scheduler_available_filters</option>
configuration option in <filename>nova.conf</filename> configuration option in <filename>nova.conf</filename>
provides the Compute service with the list of the filters provides the Compute service with the list of the filters
@ -130,10 +130,12 @@ scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFi
contain:</para> contain:</para>
<programlisting language="ini">scheduler_available_filters=nova.scheduler.filters.all_filters <programlisting language="ini">scheduler_available_filters=nova.scheduler.filters.all_filters
scheduler_available_filters=myfilter.MyFilter</programlisting> scheduler_available_filters=myfilter.MyFilter</programlisting>
<para>The <literal>scheduler_default_filters</literal> configuration option in <para>The <literal>scheduler_default_filters</literal>
<filename>nova.conf</filename> defines the list of filters that are applied by the configuration option in <filename>nova.conf</filename>
<systemitem class="service">nova-scheduler</systemitem> service. The default filters defines the list of filters that are applied by the
are:</para> <systemitem class="service"
>nova-scheduler</systemitem> service. The default
filters are:</para>
<programlisting language="ini">scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter</programlisting> <programlisting language="ini">scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter</programlisting>
<para>The following sections describe the available <para>The following sections describe the available
filters.</para> filters.</para>
@ -147,33 +149,35 @@ scheduler_available_filters=myfilter.MyFilter</programlisting>
</section> </section>
<section xml:id="aggregateimagepropertiesisolationfilter"> <section xml:id="aggregateimagepropertiesisolationfilter">
<title>AggregateImagePropertiesIsolation</title> <title>AggregateImagePropertiesIsolation</title>
<para>Matches properties defined in an image's metadata against those of aggregates to <para>Matches properties defined in an image's metadata
determine host matches:</para> against those of aggregates to determine host
<para> matches:</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>If a host belongs to an aggregate and the aggregate defines one or <para>If a host belongs to an aggregate and the
more metadata that matches an image's properties, that host is a candidate aggregate defines one or more metadata that
to boot the image's instance.</para> matches an image's properties, that host is a
</listitem> candidate to boot the image's instance.</para>
<listitem> </listitem>
<para>If a host does not belong to any aggregate, it can boot instances from <listitem>
all images.</para> <para>If a host does not belong to any aggregate,
</listitem> it can boot instances from all images.</para>
</itemizedlist> </listitem>
</para> </itemizedlist>
<para>For example, the following aggregate <systemitem>myWinAgg</systemitem> has the <para>For example, the following aggregate
Windows operating system as metadata (named 'windows'):</para> <systemitem>myWinAgg</systemitem> has the Windows
operating system as metadata (named 'windows'):</para>
<screen><prompt>$</prompt> <userinput>nova aggregate-details MyWinAgg</userinput> <screen><prompt>$</prompt> <userinput>nova aggregate-details MyWinAgg</userinput>
<computeroutput>+----+----------+-------------------+------------+---------------+ <computeroutput>+----+----------+-------------------+------------+---------------+
| Id | Name | Availability Zone | Hosts | Metadata | | Id | Name | Availability Zone | Hosts | Metadata |
+----+----------+-------------------+------------+---------------+ +----+----------+-------------------+------------+---------------+
| 1 | MyWinAgg | None | 'sf-devel' | 'os=windows' | | 1 | MyWinAgg | None | 'sf-devel' | 'os=windows' |
+----+----------+-------------------+------------+---------------+</computeroutput></screen> +----+----------+-------------------+------------+---------------+</computeroutput></screen>
<para>In this example, because the following Win-2012 image has the <property>windows</property> <para>In this example, because the following Win-2012
property, it would boot on the <systemitem>sf-devel</systemitem> host (all other image has the <property>windows</property> property,
filters being equal):</para> it boots on the <systemitem>sf-devel</systemitem> host
<screen><prompt>$</prompt> <userinput>glance image-show Win-2012</userinput> (all other filters being equal):</para>
<screen><prompt>$</prompt> <userinput>glance image-show Win-2012</userinput>
<computeroutput>+------------------+--------------------------------------+ <computeroutput>+------------------+--------------------------------------+
| Property | Value | | Property | Value |
+------------------+--------------------------------------+ +------------------+--------------------------------------+
@ -182,10 +186,11 @@ scheduler_available_filters=myfilter.MyFilter</programlisting>
| container_format | ami | | container_format | ami |
| created_at | 2013-11-14T13:24:25 | | created_at | 2013-11-14T13:24:25 |
| ...</computeroutput></screen> | ...</computeroutput></screen>
<para>You can configure the <systemitem>AggregateImagePropertiesIsolation</systemitem> filter using <para>You can configure the
the following options in the <filename>nova.conf</filename> file: <systemitem>AggregateImagePropertiesIsolation</systemitem>
</para> filter by using the following options in the
<programlisting language="ini"># Considers only keys matching the given namespace (string). <filename>nova.conf</filename> file:</para>
<programlisting language="ini"># Considers only keys matching the given namespace (string).
aggregate_image_properties_isolation_namespace=&lt;None> aggregate_image_properties_isolation_namespace=&lt;None>
# Separator used between the namespace and keys (string). # Separator used between the namespace and keys (string).
@ -193,25 +198,31 @@ aggregate_image_properties_isolation_separator=.</programlisting>
</section> </section>
<section xml:id="aggregateinstanceextraspecsfilter"> <section xml:id="aggregateinstanceextraspecsfilter">
<title>AggregateInstanceExtraSpecsFilter</title> <title>AggregateInstanceExtraSpecsFilter</title>
<para>Matches properties defined in an instance type's <para>Matches properties defined in extra specs for an
extra specs against admin-defined properties on a host instance type against admin-defined properties on a
aggregate. Works with specifications that are host aggregate. Works with specifications that are
unscoped, or are scoped with scoped with
<literal>aggregate_instance_extra_specs</literal>. <literal>aggregate_instance_extra_specs</literal>.
See the <link linkend="host-aggregates">host For backward compatibility, also works with non-scoped
aggregates</link> section for documentation on how specifications; this action is highly discouraged
to use this filter.</para> because it conflicts with <link
linkend="computecapabilitiesfilter">
ComputeCapabilitiesFilter</link> filter when you
enable both filters. For information about how to use
this filter, see the <link linkend="host-aggregates"
>host aggregates</link> section.</para>
</section> </section>
<section xml:id="aggregate-multi-tenancy-isolation"> <section xml:id="aggregate-multi-tenancy-isolation">
<title>AggregateMultiTenancyIsolation</title> <title>AggregateMultiTenancyIsolation</title>
<para>Isolates tenants to specific <link <para>Isolates tenants to specific <link
linkend="host-aggregates">host aggregates</link>. linkend="host-aggregates">host aggregates</link>.
If a host is in an aggregate that has the metadata key If a host is in an aggregate that has the
<literal>filter_tenant_id</literal> it only <literal>filter_tenant_id</literal> metadata key,
creates instances from that tenant (or list of the host creates instances from only that tenant or
tenants). A host can be in different aggregates. If a list of tenants. A host can be in different
host does not belong to an aggregate with the metadata aggregates. If a host does not belong to an aggregate
key, it can create instances from all tenants.</para> with the metadata key, the host can create instances
from all tenants.</para>
</section> </section>
<section xml:id="aggregate-ram-filter"> <section xml:id="aggregate-ram-filter">
<title>AggregateRamFilter</title> <title>AggregateRamFilter</title>
@ -224,40 +235,46 @@ aggregate_image_properties_isolation_separator=.</programlisting>
</section> </section>
<section xml:id="allhostsfilter"> <section xml:id="allhostsfilter">
<title>AllHostsFilter</title> <title>AllHostsFilter</title>
<para>This is a no-op filter, it does not eliminate any of <para>This is a no-op filter. It does not eliminate any of
the available hosts.</para> the available hosts.</para>
</section> </section>
<section xml:id="availabilityzonefilter"> <section xml:id="availabilityzonefilter">
<title>AvailabilityZoneFilter</title> <title>AvailabilityZoneFilter</title>
<para>Filters hosts by availability zone. This filter must <para>Filters hosts by availability zone. You must enable
be enabled for the scheduler to respect availability this filter for the scheduler to respect availability
zones in requests.</para> zones in requests.</para>
</section> </section>
<section xml:id="computecapabilitiesfilter"> <section xml:id="computecapabilitiesfilter">
<title>ComputeCapabilitiesFilter</title> <title>ComputeCapabilitiesFilter</title>
<para>Matches properties defined in an instance type's <para>Matches properties defined in extra specs for an
extra specs against compute capabilities.</para> instance type against compute capabilities.</para>
<para>If an extra specs key contains a colon ":", anything <para>If an extra specs key contains a colon
before the colon is treated as a namespace, and (<literal>:</literal>), anything before the colon
anything after the colon is treated as the key to be is treated as a namespace and anything after the colon
matched. If a namespace is present and is not is treated as the key to be matched. If a namespace is
'capabilities', it is ignored by this filter.</para> present and is not <literal>capabilities</literal>,
the filter ignores the namespace. For backward
compatibility, also treats the extra specs key as the
key to be matched if no namespace is present; this
action is highly discouraged because it conflicts with
<link linkend="aggregateinstanceextraspecsfilter">
AggregateInstanceExtraSpecsFilter</link> filter
when you enable both filters.</para>
</section> </section>
<section xml:id="computefilter"> <section xml:id="computefilter">
<title>ComputeFilter</title> <title>ComputeFilter</title>
<para>Passes all hosts that are operational and <para>Passes all hosts that are operational and
enabled.</para> enabled.</para>
<para>In general, this filter should always be enabled. <para>In general, you should always enable this filter.</para>
</para>
</section> </section>
<section xml:id="corefilter"> <section xml:id="corefilter">
<title>CoreFilter</title> <title>CoreFilter</title>
<para>Only schedules instances on hosts if there are <para>Only schedules instances on hosts if sufficient CPU
sufficient CPU cores available. If this filter is not cores are available. If this filter is not set, the
set, the scheduler may over-provision a host based on scheduler might over-provision a host based on cores.
cores (for example, the virtual cores running on an For example, the virtual cores running on an instance
instance may exceed the physical cores).</para> may exceed the physical cores.</para>
<para>This filter can be configured to allow a fixed <para>You can configure this filter to enable a fixed
amount of vCPU overcommitment by using the amount of vCPU overcommitment by using the
<option>cpu_allocation_ratio</option> <option>cpu_allocation_ratio</option>
Configuration option in Configuration option in
@ -270,22 +287,23 @@ aggregate_image_properties_isolation_separator=.</programlisting>
<para>To disallow vCPU overcommitment set:</para> <para>To disallow vCPU overcommitment set:</para>
<programlisting language="ini">cpu_allocation_ratio=1.0</programlisting> <programlisting language="ini">cpu_allocation_ratio=1.0</programlisting>
<note> <note>
<para> <para>The Compute API always returns the actual
The Compute API will always return the actual number of CPU number of CPU cores available on a compute node
cores available on a compute node regardless of the value of regardless of the value of the
the <option>cpu_allocation_ratio</option> configuration key. As <option>cpu_allocation_ratio</option>
a result changes to the <option>cpu_allocation_ratio</option> configuration key. As a result changes to the
are not reflected via the command line clients or the <option>cpu_allocation_ratio</option> are not
dashboard. Changes to this configuration key are only taken reflected via the command line clients or the
into account internally in the scheduler. dashboard. Changes to this configuration key are
</para> only taken into account internally in the
scheduler.</para>
</note> </note>
</section> </section>
<section xml:id="differenthostfilter"> <section xml:id="differenthostfilter">
<title>DifferentHostFilter</title> <title>DifferentHostFilter</title>
<para>Schedules the instance on a different host from a set <para>Schedules the instance on a different host from a
of instances. To take advantage of this filter, the set of instances. To take advantage of this filter,
requester must pass a scheduler hint, using the requester must pass a scheduler hint, using
<literal>different_host</literal> as the key and a <literal>different_host</literal> as the key and a
list of instance uuids as the value. This filter is list of instance uuids as the value. This filter is
the opposite of the <literal>SameHostFilter</literal>. the opposite of the <literal>SameHostFilter</literal>.
@ -305,7 +323,7 @@ aggregate_image_properties_isolation_separator=.</programlisting>
<para>Only schedules instances on hosts if there is <para>Only schedules instances on hosts if there is
sufficient disk space available for root and ephemeral sufficient disk space available for root and ephemeral
storage.</para> storage.</para>
<para>This filter can be configured to allow a fixed <para>You can configure this filter to enable a fixed
amount of disk overcommitment by using the amount of disk overcommitment by using the
<literal>disk_allocation_ratio</literal> <literal>disk_allocation_ratio</literal>
Configuration option in Configuration option in
@ -315,14 +333,16 @@ aggregate_image_properties_isolation_separator=.</programlisting>
<para>Adjusting this value to greater than 1.0 enables <para>Adjusting this value to greater than 1.0 enables
scheduling instances while over committing disk scheduling instances while over committing disk
resources on the node. This might be desirable if you resources on the node. This might be desirable if you
use an image format that is sparse or copy on write use an image format that is sparse or copy on write so
so that each virtual instance does not require a 1:1 that each virtual instance does not require a 1:1
allocation of virtual disk to physical storage.</para> allocation of virtual disk to physical storage.</para>
</section> </section>
<section xml:id="groupaffinityfilter"> <section xml:id="groupaffinityfilter">
<title>GroupAffinityFilter</title> <title>GroupAffinityFilter</title>
<note><para>This filter is deprecated in favor of <link <note>
linkend="servergroupantiaffinityfilter">ServerGroupAffinityFilter</link>.</para> <para>This filter is deprecated in favor of <link
linkend="servergroupantiaffinityfilter"
>ServerGroupAffinityFilter</link>.</para>
</note> </note>
<para>The GroupAffinityFilter ensures that an instance is <para>The GroupAffinityFilter ensures that an instance is
scheduled on to a host from a set of group hosts. To scheduled on to a host from a set of group hosts. To
@ -333,15 +353,17 @@ aggregate_image_properties_isolation_separator=.</programlisting>
<literal>--hint</literal> flag. For <literal>--hint</literal> flag. For
example:</para> example:</para>
<screen><prompt>$</prompt> <userinput>nova boot --image <replaceable>IMAGE_ID</replaceable> --flavor 1 --hint group=foo server-1</userinput></screen> <screen><prompt>$</prompt> <userinput>nova boot --image <replaceable>IMAGE_ID</replaceable> --flavor 1 --hint group=foo server-1</userinput></screen>
<para>This filter should not be enabled at the same time as <link <para>This filter should not be enabled at the same time
linkend="groupantiaffinityfilter">GroupAntiAffinityFilter</link> as <link linkend="groupantiaffinityfilter"
or neither filter will work properly.</para> >GroupAntiAffinityFilter</link> or neither filter
will work properly.</para>
</section> </section>
<section xml:id="groupantiaffinityfilter"> <section xml:id="groupantiaffinityfilter">
<title>GroupAntiAffinityFilter</title> <title>GroupAntiAffinityFilter</title>
<note><para>This filter is deprecated in favor of <note>
<link <para>This filter is deprecated in favor of <link
linkend="servergroupantiaffinityfilter">ServerGroupAntiAffinityFilter</link>.</para> linkend="servergroupantiaffinityfilter"
>ServerGroupAntiAffinityFilter</link>.</para>
</note> </note>
<para>The GroupAntiAffinityFilter ensures that each <para>The GroupAntiAffinityFilter ensures that each
instance in a group is on a different host. To take instance in a group is on a different host. To take
@ -352,9 +374,10 @@ aggregate_image_properties_isolation_separator=.</programlisting>
<literal>--hint</literal> flag. For <literal>--hint</literal> flag. For
example:</para> example:</para>
<screen><prompt>$</prompt> <userinput>nova boot --image <replaceable>IMAGE_ID</replaceable> --flavor 1 --hint group=foo server-1</userinput></screen> <screen><prompt>$</prompt> <userinput>nova boot --image <replaceable>IMAGE_ID</replaceable> --flavor 1 --hint group=foo server-1</userinput></screen>
<para>This filter should not be enabled at the same time as <link <para>This filter should not be enabled at the same time
linkend="groupaffinityfilter">GroupAffinityFilter</link> or as <link linkend="groupaffinityfilter"
neither filter will work properly.</para> >GroupAffinityFilter</link> or neither filter will
work properly.</para>
</section> </section>
<section xml:id="imagepropertiesfilter"> <section xml:id="imagepropertiesfilter">
<title>ImagePropertiesFilter</title> <title>ImagePropertiesFilter</title>
@ -407,10 +430,9 @@ aggregate_image_properties_isolation_separator=.</programlisting>
and hosts in the <filename>nova.conf</filename> file and hosts in the <filename>nova.conf</filename> file
using the <literal>isolated_hosts</literal> and using the <literal>isolated_hosts</literal> and
<literal>isolated_images</literal> configuration <literal>isolated_images</literal> configuration
options. For example: options. For example:</para>
<programlisting language="ini">isolated_hosts=server1,server2 <programlisting language="ini">isolated_hosts=server1,server2
isolated_images=342b492c-128f-4a42-8d3a-c5088cf27d13,ebd267a6-ca86-4d6c-9a0e-bd132d6b7d09</programlisting> isolated_images=342b492c-128f-4a42-8d3a-c5088cf27d13,ebd267a6-ca86-4d6c-9a0e-bd132d6b7d09</programlisting>
</para>
</section> </section>
<section xml:id="jsonfilter"> <section xml:id="jsonfilter">
<title>JsonFilter</title> <title>JsonFilter</title>
@ -476,16 +498,15 @@ isolated_images=342b492c-128f-4a42-8d3a-c5088cf27d13,ebd267a6-ca86-4d6c-9a0e-bd1
the scheduler may over provision a host based on RAM the scheduler may over provision a host based on RAM
(for example, the RAM allocated by virtual machine (for example, the RAM allocated by virtual machine
instances may exceed the physical RAM).</para> instances may exceed the physical RAM).</para>
<para>This filter can be configured to allow a fixed <para>You can configure this filter to enable a fixed
amount of RAM overcommitment by using the amount of RAM overcommitment by using the
<literal>ram_allocation_ratio</literal> <literal>ram_allocation_ratio</literal>
configuration option in configuration option in
<filename>nova.conf</filename>. The default setting <filename>nova.conf</filename>. The default setting
is:</para> is:</para>
<programlisting <programlisting language="ini">ram_allocation_ratio=1.5</programlisting>
language="ini">ram_allocation_ratio=1.5</programlisting>
<para>This setting enables 1.5&nbsp;GB instances to run on <para>This setting enables 1.5&nbsp;GB instances to run on
any compute node with 1&nbsp;GB of free RAM.</para> any compute node with 1&nbsp;GB of free RAM.</para>
</section> </section>
<section xml:id="retryfilter"> <section xml:id="retryfilter">
<title>RetryFilter</title> <title>RetryFilter</title>
@ -520,12 +541,13 @@ isolated_images=342b492c-128f-4a42-8d3a-c5088cf27d13,ebd267a6-ca86-4d6c-9a0e-bd1
</section> </section>
<section xml:id="servergroupaffinityfilter"> <section xml:id="servergroupaffinityfilter">
<title>ServerGroupAffinityFilter</title> <title>ServerGroupAffinityFilter</title>
<para>The ServerGroupAffinityFilter ensures that an instance is <para>The ServerGroupAffinityFilter ensures that an
scheduled on to a host from a set of group hosts. To instance is scheduled on to a host from a set of group
take advantage of this filter, the requester must create a hosts. To take advantage of this filter, the requester
server group with an <literal>affinity</literal> policy, and must create a server group with an
pass a scheduler hint, using <literal>group</literal> as the key <literal>affinity</literal> policy, and pass a
and the server group UUID as the value. Using the scheduler hint, using <literal>group</literal> as the
key and the server group UUID as the value. Using the
<command>nova</command> command-line tool, use the <command>nova</command> command-line tool, use the
<literal>--hint</literal> flag. For <literal>--hint</literal> flag. For
example:</para> example:</para>
@ -534,11 +556,12 @@ isolated_images=342b492c-128f-4a42-8d3a-c5088cf27d13,ebd267a6-ca86-4d6c-9a0e-bd1
</section> </section>
<section xml:id="servergroupantiaffinityfilter"> <section xml:id="servergroupantiaffinityfilter">
<title>ServerGroupAntiAffinityFilter</title> <title>ServerGroupAntiAffinityFilter</title>
<para>The ServerGroupAntiAffinityFilter ensures that each instance in <para>The ServerGroupAntiAffinityFilter ensures that each
a group is on a different host. To take advantage of this instance in a group is on a different host. To take
filter, the requester must create a server group with an advantage of this filter, the requester must create a
<literal>anti-affinity</literal> policy, and pass a scheduler server group with an <literal>anti-affinity</literal>
hint, using <literal>group</literal> as the key and the server policy, and pass a scheduler hint, using
<literal>group</literal> as the key and the server
group UUID as the value. Using the group UUID as the value. Using the
<command>nova</command> command-line tool, use the <command>nova</command> command-line tool, use the
<literal>--hint</literal> flag. For <literal>--hint</literal> flag. For
@ -548,10 +571,10 @@ isolated_images=342b492c-128f-4a42-8d3a-c5088cf27d13,ebd267a6-ca86-4d6c-9a0e-bd1
</section> </section>
<section xml:id="simplecidraffinityfilter"> <section xml:id="simplecidraffinityfilter">
<title>SimpleCIDRAffinityFilter</title> <title>SimpleCIDRAffinityFilter</title>
<para>Schedules the instance based on host IP subnet range. <para>Schedules the instance based on host IP subnet
To take advantage of this filter, the requester must range. To take advantage of this filter, the requester
specify a range of valid IP address in CIDR format, by must specify a range of valid IP address in CIDR
passing two scheduler hints:</para> format, by passing two scheduler hints:</para>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><literal>build_near_host_ip</literal></term> <term><literal>build_near_host_ip</literal></term>
@ -584,26 +607,33 @@ isolated_images=342b492c-128f-4a42-8d3a-c5088cf27d13,ebd267a6-ca86-4d6c-9a0e-bd1
<section xml:id="weights"> <section xml:id="weights">
<title>Weights</title> <title>Weights</title>
<?dbhtml stop-chunking?> <?dbhtml stop-chunking?>
<para>When resourcing instances, the Filter Scheduler filters and weighs each host in the <para>When resourcing instances, the Filter Scheduler filters
list of acceptable hosts. Each time the scheduler selects a host, it virtually consumes and weighs each host in the list of acceptable hosts. Each
resources on it, and subsequent selections are adjusted accordingly. This process is time the scheduler selects a host, it virtually consumes
useful when the customer asks for the same large amount of instances, because weight is resources on it, and subsequent selections are adjusted
accordingly. This process is useful when the customer asks
for the same large amount of instances, because weight is
computed for each requested instance.</para> computed for each requested instance.</para>
<para>All weights are normalized before being summed up; the host with the largest weight is <para>All weights are normalized before being summed up; the
given the highest priority.</para> host with the largest weight is given the highest
priority.</para>
<figure xml:id="figure_weighing-hosts"> <figure xml:id="figure_weighing-hosts">
<title>Weighing hosts</title> <title>Weighing hosts</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="../../common/figures/nova-weighting-hosts.png"/> <imagedata
fileref="../../common/figures/nova-weighting-hosts.png"
/>
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>
<para>If cells are used, cells are weighted by the scheduler in the same manner as hosts.</para> <para>If cells are used, cells are weighted by the scheduler
<para>Hosts and cells are weighed based on the following options in the in the same manner as hosts.</para>
<filename>/etc/nova/nova.conf</filename> file:</para> <para>Hosts and cells are weighed based on the following
options in the <filename>/etc/nova/nova.conf</filename>
file:</para>
<table rules="all" xml:id="table_host-weighting-options"> <table rules="all" xml:id="table_host-weighting-options">
<caption>Host Weighting options</caption> <caption>Host weighting options</caption>
<col width="10%" title="Section"/> <col width="10%" title="Section"/>
<col width="25%" title="Option"/> <col width="25%" title="Option"/>
<col width="60%" title="Description"/> <col width="60%" title="Description"/>
@ -618,58 +648,81 @@ isolated_images=342b492c-128f-4a42-8d3a-c5088cf27d13,ebd267a6-ca86-4d6c-9a0e-bd1
<tr valign="top"> <tr valign="top">
<td>[DEFAULT]</td> <td>[DEFAULT]</td>
<td><literal>ram_weight_multiplier</literal></td> <td><literal>ram_weight_multiplier</literal></td>
<td>By default, the scheduler spreads instances across all hosts evenly. Set the <td>By default, the scheduler spreads instances
<option>ram_weight_multiplier</option> option to across all hosts evenly. Set the
a negative number if you prefer stacking instead of spreading. Use a <option>ram_weight_multiplier</option>
option to a negative number if you prefer
stacking instead of spreading. Use a
floating-point value.</td> floating-point value.</td>
</tr> </tr>
<tr valign="top"> <tr valign="top">
<td>[DEFAULT]</td> <td>[DEFAULT]</td>
<td><literal>scheduler_host_subset_size</literal></td> <td><literal>scheduler_host_subset_size</literal></td>
<td>New instances are scheduled on a host that is chosen randomly from a subset <td>New instances are scheduled on a host that is
of the N best hosts. This property defines the subset size from which a host chosen randomly from a subset of the N best
is chosen. A value of 1 chooses the first host returned by the weighing hosts. This property defines the subset size
functions.This value must be at least 1. A value less than 1 is ignored, and from which a host is chosen. A value of 1
1 is used instead. Use an integer value.</td> chooses the first host returned by the
weighing functions. This value must be at
least 1. A value less than 1 is ignored, and 1
is used instead. Use an integer value.</td>
</tr> </tr>
<tr valign="top"> <tr valign="top">
<td>[DEFAULT]</td> <td>[DEFAULT]</td>
<td><literal>scheduler_weight_classes</literal></td> <td><literal>scheduler_weight_classes</literal></td>
<td>Defaults to <literal>nova.scheduler.weights.all_weighers</literal>, which <td>Defaults to
selects the only available weigher, the RamWeigher. Hosts are then weighed <literal>nova.scheduler.weights.all_weighers</literal>,
and sorted with the largest weight winning.</td> which selects the only available weigher, the
RamWeigher. Hosts are then weighed and sorted
with the largest weight winning.</td>
</tr> </tr>
<tr valign="top"> <tr valign="top">
<td>[metrics]</td> <td>[metrics]</td>
<td><literal>weight_multiplier</literal></td> <td><literal>weight_multiplier</literal></td>
<td>Multiplier for weighing metrices. Use a floating-point value.</td> <td>Multiplier for weighing metrics. Use a
floating-point value.</td>
</tr> </tr>
<tr valign="top"> <tr valign="top">
<td>[metrics]</td> <td>[metrics]</td>
<td><literal>weight_setting</literal></td> <td><literal>weight_setting</literal></td>
<td>Determines how metrics are weighed. Use a comma-separated list of <td>Determines how metrics are weighed. Use a
metricName=ratio. For example: "name1=1.0, name2=-1.0" results in: comma-separated list of metricName=ratio. For
<literal>name1.value * 1.0 + name2.value * -1.0</literal> example: "name1=1.0, name2=-1.0" results in:
<literal>name1.value * 1.0 + name2.value *
-1.0</literal>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr valign="top">
<td>[metrics]</td> <td>[metrics]</td>
<td><literal>required</literal></td> <td><literal>required</literal></td>
<td><para>Specifies how to treat unavailable metrics:<itemizedlist> <td><para>Specifies how to treat unavailable metrics:<itemizedlist>
<listitem><para>True&mdash;Raises an exception. To avoid the raised exception, you should use the scheduler <listitem>
filter <literal>MetricFilter</literal> to filter out hosts <para>True&mdash;Raises an
with unavailable metrics.</para></listitem> exception. To avoid the raised
<listitem><para>False&mdash;Treated as a negative factor in the weighing process (uses the exception, you should use the
<option>weight_of_unavailable</option> option).</para></listitem> scheduler filter
</itemizedlist></para></td> <literal>MetricFilter</literal> to
filter out hosts with unavailable
metrics.</para>
</listitem>
<listitem>
<para>False&mdash;Treated as a
negative factor in the weighing
process (uses the
<option>weight_of_unavailable</option>
option).</para>
</listitem>
</itemizedlist></para></td>
</tr> </tr>
<tr valign="top"> <tr valign="top">
<td>[metrics]</td> <td>[metrics]</td>
<td><literal>weight_of_unavailable</literal></td> <td><literal>weight_of_unavailable</literal></td>
<td>If <option>required</option> is set to False, and any one of the metrics set <td>If <option>required</option> is set to False,
by <option>weight_setting</option> is unavailable, the and any one of the metrics set by
<option>weight_of_unavailable</option> value is returned to the <option>weight_setting</option> is
scheduler.</td> unavailable, the
<option>weight_of_unavailable</option>
value is returned to the scheduler.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -684,52 +737,61 @@ weight_setting=name1=1.0, name2=-1.0
required=false required=false
weight_of_unavailable=-10000.0</programlisting> weight_of_unavailable=-10000.0</programlisting>
<table rules="all" xml:id="table_cell-weighting-options"> <table rules="all" xml:id="table_cell-weighting-options">
<caption>Cell weighting options</caption> <caption>Cell weighting options</caption>
<col width="10%" title="Section"/> <col width="10%" title="Section"/>
<col width="25%" title="Option"/> <col width="25%" title="Option"/>
<col width="60%" title="Description"/> <col width="60%" title="Description"/>
<thead> <thead>
<tr> <tr>
<th>Section</th> <th>Section</th>
<th>Option</th> <th>Option</th>
<th>Description</th> <th>Description</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr valign="top"> <tr valign="top">
<td>[cells]</td> <td>[cells]</td>
<td><literal>mute_weight_multiplier</literal></td> <td><literal>mute_weight_multiplier</literal></td>
<td>Multiplier to weigh mute children (hosts which have not sent capacity or <td>Multiplier to weigh mute children (hosts which
capacity updates for some time). Use a negative, floating-point value.</td> have not sent capacity or capacity updates for
</tr> some time). Use a negative, floating-point
<tr valign="top"> value.</td>
<td>[cells]</td> </tr>
<td><literal>mute_weight_value</literal></td> <tr valign="top">
<td>Weight value assigned to mute children. Use a positive, floating-point value <td>[cells]</td>
with a maximum of '1.0'.</td> <td><literal>mute_weight_value</literal></td>
</tr> <td>Weight value assigned to mute children. Use a
<tr valign="top"> positive, floating-point value with a maximum
<td>[cells]</td> of '1.0'.</td>
<td><literal>offset_weight_multiplier</literal></td> </tr>
<td>Multiplier to weigh cells, so you can specify a preferred cell. Use a floating <tr valign="top">
point value.</td> <td>[cells]</td>
</tr> <td><literal>offset_weight_multiplier</literal></td>
<tr valign="top"> <td>Multiplier to weigh cells, so you can specify
<td>[cells]</td> a preferred cell. Use a floating point
<td><literal>ram_weight_multiplier</literal></td> value.</td>
<td>By default, the scheduler spreads instances across all cells evenly. Set the </tr>
<option>ram_weight_multiplier</option> option to a negative number if <tr valign="top">
you prefer stacking instead of spreading. Use a floating-point value.</td> <td>[cells]</td>
</tr> <td><literal>ram_weight_multiplier</literal></td>
<tr valign="top"> <td>By default, the scheduler spreads instances
<td>[cells]</td> across all cells evenly. Set the
<td><literal>scheduler_weight_classes</literal></td> <option>ram_weight_multiplier</option>
<td>Defaults to <literal>nova.cells.weights.all_weighers</literal>, which maps to option to a negative number if you prefer
all cell weighers included with Compute. Cells are then weighed and sorted stacking instead of spreading. Use a
floating-point value.</td>
</tr>
<tr valign="top">
<td>[cells]</td>
<td><literal>scheduler_weight_classes</literal></td>
<td>Defaults to
<literal>nova.cells.weights.all_weighers</literal>,
which maps to all cell weighers included with
Compute. Cells are then weighed and sorted
with the largest weight winning.</td> with the largest weight winning.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<para>For example:</para> <para>For example:</para>
<programlisting language="ini">[cells] <programlisting language="ini">[cells]
scheduler_weight_classes=nova.cells.weights.all_weighers scheduler_weight_classes=nova.cells.weights.all_weighers
@ -752,8 +814,8 @@ offset_weight_multiplier=1.0</programlisting>
href="../../common/section_cli_nova_host_aggregates.xml"/> href="../../common/section_cli_nova_host_aggregates.xml"/>
<section xml:id="compute-scheduler-config-ref"> <section xml:id="compute-scheduler-config-ref">
<title>Configuration reference</title> <title>Configuration reference</title>
<para>To customize the Compute scheduler, use the configuration option <para>To customize the Compute scheduler, use the
settings documented in <xref configuration option settings documented in <xref
linkend="config_table_nova_scheduling"/>.</para> linkend="config_table_nova_scheduling"/>.</para>
</section> </section>
</section> </section>