Puppet Class: nova::scheduler::filter

Defined in:
manifests/scheduler/filter.pp

Overview

Class: nova::scheduler::filter

This class is aim to configure nova.scheduler filter

Parameters:

host_subset_size

(optional) defines the subset size that a host is chosen from Defaults to $facts

max_io_ops_per_host

(optional) Ignore hosts that have too many builds/resizes/snaps/migrations Defaults to $facts

max_instances_per_host

(optional) Ignore hosts that have too many instances Defaults to $facts

isolated_images

(optional) An array of images to run on isolated host Defaults to $facts

isolated_hosts

(optional) An array of hosts reserved for specific images Defaults to $facts

available_filters

(optional) An array with filter classes available to the scheduler. Example: [‘first.filter.class’, ‘second.filter.class’] Defaults to [‘nova.scheduler.filters.all_filters’]

enabled_filters

(optional) An array of filters to be used by default Defaults to $facts

weight_classes

(optional) Which weight class names to use for weighing hosts Defaults to ‘nova.scheduler.weights.all_weighers’

track_instance_changes

(optional) Enable querying of individual hosts for instance information. Defaults to $facts

ram_weight_multiplier

(optional) Ram weight multiplier ratio. This option determines how hosts with more or less available RAM are weighed. Defaults to $facts

cpu_weight_multiplier

(optional) CPU weight multiplier ratio. This options determines how hosts with more or less available CPU cores are weighed. Negative numbers mean to stack vs spread. Defaults to $facts

disk_weight_multiplier

(optional) Disk weight multiplier ratio. Multiplier used for weighing free disk space. Negative numbers mean to stack vs spread. Defaults to $facts

io_ops_weight_multiplier

(optional) IO operations weight multiplier ratio. This option determines how hosts with differing workloads are weighed Defaults to $facts

soft_affinity_weight_multiplier

(optional) Multiplier used for weighing hosts for group soft-affinity Defaults to $facts

soft_anti_affinity_weight_multiplier

(optional) Multiplier used for weighing hosts for group soft-anti-affinity Defaults to $facts

build_failure_weight_multiplier

(optional) Multiplier used for weighing hosts that have had recent build failures Defaults to $facts

cross_cell_move_weight_multiplier

(optional) Multiplier used for weighing hosts during a cross-cell move Defaults to $facts

num_instances_weight_multiplier

(optional) Number of instances weight multiplier ratio. Defaults to $facts

hypervisor_version_weight_multiplier

(optional) Hypervisor Version weight multiplier ratio. Defaults to $facts

shuffle_best_same_weighed_hosts

(optional) Enabled spreading the instances between hosts with the same best weight Defaults to $facts

restrict_isolated_hosts_to_isolated_images

(optional) Prevent non-isolated images from being built on isolated hosts. Defaults to $facts

aggregate_image_properties_isolation_namespace

(optional) Image property namespace for use in the host aggregate Defaults to $facts

aggregate_image_properties_isolation_separator

(optional) Separator character(s) for image property namespace and name Defaults to $facts

pci_in_placement

(optional) Enable scheduling and claiming PCI devices in Placement. Defaults to $facts

Parameters:

  • host_subset_size (Any) (defaults to: $facts['os_service_default'])
  • max_io_ops_per_host (Any) (defaults to: $facts['os_service_default'])
  • max_instances_per_host (Any) (defaults to: $facts['os_service_default'])
  • isolated_images (Any) (defaults to: $facts['os_service_default'])
  • isolated_hosts (Any) (defaults to: $facts['os_service_default'])
  • available_filters (Any) (defaults to: $facts['os_service_default'])
  • enabled_filters (Any) (defaults to: $facts['os_service_default'])
  • weight_classes (Any) (defaults to: $facts['os_service_default'])
  • track_instance_changes (Any) (defaults to: $facts['os_service_default'])
  • ram_weight_multiplier (Any) (defaults to: $facts['os_service_default'])
  • cpu_weight_multiplier (Any) (defaults to: $facts['os_service_default'])
  • disk_weight_multiplier (Any) (defaults to: $facts['os_service_default'])
  • io_ops_weight_multiplier (Any) (defaults to: $facts['os_service_default'])
  • soft_affinity_weight_multiplier (Any) (defaults to: $facts['os_service_default'])
  • soft_anti_affinity_weight_multiplier (Any) (defaults to: $facts['os_service_default'])
  • build_failure_weight_multiplier (Any) (defaults to: $facts['os_service_default'])
  • cross_cell_move_weight_multiplier (Any) (defaults to: $facts['os_service_default'])
  • num_instances_weight_multiplier (Any) (defaults to: $facts['os_service_default'])
  • hypervisor_version_weight_multiplier (Any) (defaults to: $facts['os_service_default'])
  • shuffle_best_same_weighed_hosts (Any) (defaults to: $facts['os_service_default'])
  • restrict_isolated_hosts_to_isolated_images (Any) (defaults to: $facts['os_service_default'])
  • aggregate_image_properties_isolation_namespace (Any) (defaults to: $facts['os_service_default'])
  • aggregate_image_properties_isolation_separator (Any) (defaults to: $facts['os_service_default'])
  • pci_in_placement (Any) (defaults to: $facts['os_service_default'])


111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'manifests/scheduler/filter.pp', line 111

class nova::scheduler::filter (
  $host_subset_size                               = $facts['os_service_default'],
  $max_io_ops_per_host                            = $facts['os_service_default'],
  $max_instances_per_host                         = $facts['os_service_default'],
  $isolated_images                                = $facts['os_service_default'],
  $isolated_hosts                                 = $facts['os_service_default'],
  $available_filters                              = $facts['os_service_default'],
  $enabled_filters                                = $facts['os_service_default'],
  $weight_classes                                 = $facts['os_service_default'],
  $track_instance_changes                         = $facts['os_service_default'],
  $ram_weight_multiplier                          = $facts['os_service_default'],
  $cpu_weight_multiplier                          = $facts['os_service_default'],
  $disk_weight_multiplier                         = $facts['os_service_default'],
  $io_ops_weight_multiplier                       = $facts['os_service_default'],
  $soft_affinity_weight_multiplier                = $facts['os_service_default'],
  $soft_anti_affinity_weight_multiplier           = $facts['os_service_default'],
  $build_failure_weight_multiplier                = $facts['os_service_default'],
  $cross_cell_move_weight_multiplier              = $facts['os_service_default'],
  $num_instances_weight_multiplier                = $facts['os_service_default'],
  $hypervisor_version_weight_multiplier           = $facts['os_service_default'],
  $shuffle_best_same_weighed_hosts                = $facts['os_service_default'],
  $restrict_isolated_hosts_to_isolated_images     = $facts['os_service_default'],
  $aggregate_image_properties_isolation_namespace = $facts['os_service_default'],
  $aggregate_image_properties_isolation_separator = $facts['os_service_default'],
  $pci_in_placement                               = $facts['os_service_default'],
) {

  include nova::deps

  if empty($available_filters) {
    warning('available_filters is empty. Nova is deployed without filters')
  }
  if empty($enabled_filters) {
    warning('enabled_filters is empty. Nova is deployed without filters')
  }

  nova_config {
    'filter_scheduler/host_subset_size':
      value => $host_subset_size;
    'filter_scheduler/max_io_ops_per_host':
      value => $max_io_ops_per_host;
    'filter_scheduler/max_instances_per_host':
      value => $max_instances_per_host;
    'filter_scheduler/track_instance_changes':
      value => $track_instance_changes;
    'filter_scheduler/available_filters':
      value => $available_filters;
    'filter_scheduler/weight_classes':
      value => $weight_classes;
    'filter_scheduler/enabled_filters':
      value => join(any2array($enabled_filters), ',');
    'filter_scheduler/isolated_images':
      value => join(any2array($isolated_images), ',');
    'filter_scheduler/isolated_hosts':
      value => join(any2array($isolated_hosts), ',');
    'filter_scheduler/ram_weight_multiplier':
      value => $ram_weight_multiplier;
    'filter_scheduler/cpu_weight_multiplier':
      value => $cpu_weight_multiplier;
    'filter_scheduler/disk_weight_multiplier':
      value => $disk_weight_multiplier;
    'filter_scheduler/io_ops_weight_multiplier':
      value => $io_ops_weight_multiplier;
    'filter_scheduler/soft_affinity_weight_multiplier':
      value => $soft_affinity_weight_multiplier;
    'filter_scheduler/soft_anti_affinity_weight_multiplier':
      value => $soft_anti_affinity_weight_multiplier;
    'filter_scheduler/build_failure_weight_multiplier':
      value => $build_failure_weight_multiplier;
    'filter_scheduler/cross_cell_move_weight_multiplier':
      value => $cross_cell_move_weight_multiplier;
    'filter_scheduler/num_instances_weight_multiplier':
      value => $num_instances_weight_multiplier;
    'filter_scheduler/hypervisor_version_weight_multiplier':
      value => $hypervisor_version_weight_multiplier;
    'filter_scheduler/shuffle_best_same_weighed_hosts':
      value => $shuffle_best_same_weighed_hosts;
    'filter_scheduler/restrict_isolated_hosts_to_isolated_images':
      value => $restrict_isolated_hosts_to_isolated_images;
    'filter_scheduler/aggregate_image_properties_isolation_namespace':
      value => $aggregate_image_properties_isolation_namespace;
    'filter_scheduler/aggregate_image_properties_isolation_separator':
      value => $aggregate_image_properties_isolation_separator;
    'filter_scheduler/pci_in_placement':
      value => $pci_in_placement;
  }

}