1 # == Class: nova:scheduler::filter
3 # This class is aim to configure nova.scheduler filter
7 # [*scheduler_host_manager*]
8 # (optional) The scheduler host manager class to use
9 # Defaults to 'nova.scheduler.host_manager.HostManager'
11 # [*scheduler_max_attempts*]
12 # (optional) Maximum number of attempts to schedule an instance
15 # [*scheduler_host_subset_size*]
16 # (optional) defines the subset size that a host is chosen from
19 # [*cpu_allocation_ratio*]
20 # (optional) Virtual CPU to Physical CPU allocation ratio
23 # [*disk_allocation_ratio*]
24 # (optional) Virtual disk to physical disk allocation ratio
27 # [*max_io_ops_per_host*]
28 # (optional) Ignore hosts that have too many builds/resizes/snaps/migrations
32 # (optional) Images to run on isolated host
36 # (optional) Host reserved for specific images
39 # [*max_instances_per_host*]
40 # (optional) Ignore hosts that have too many instances
43 # [*ram_allocation_ratio:*]
44 # (optional) Virtual ram to physical ram allocation ratio
47 # [*scheduler_available_filters*]
48 # (optional) Filter classes available to the scheduler
49 # Defaults to 'nova.scheduler.filters.all_filters'
51 # [*scheduler_default_filters*]
52 # (optional) An array of filters to be used by default
55 # [*scheduler_weight_classes*]
56 # (optional) Which weight class names to use for weighing hosts
57 # Defaults to 'nova.scheduler.weights.all_weighers'
59 class nova::scheduler::filter (
60 $scheduler_host_manager = 'nova.scheduler.host_manager.HostManager',
61 $scheduler_max_attempts = '3',
62 $scheduler_host_subset_size = '1',
63 $cpu_allocation_ratio = '16.0',
64 $disk_allocation_ratio = '1.0',
65 $max_io_ops_per_host = '8',
66 $max_instances_per_host = '50',
67 $ram_allocation_ratio = '1.5',
68 $isolated_images = false,
69 $isolated_hosts = false,
70 $scheduler_available_filters = 'nova.scheduler.filters.all_filters',
71 $scheduler_default_filters = false,
72 $scheduler_weight_classes = 'nova.scheduler.weights.all_weighers',
76 'DEFAULT/scheduler_host_manager': value => $scheduler_host_manager;
77 'DEFAULT/scheduler_max_attempts': value => $scheduler_max_attempts;
78 'DEFAULT/scheduler_host_subset_size': value => $scheduler_host_subset_size;
79 'DEFAULT/cpu_allocation_ratio': value => $cpu_allocation_ratio;
80 'DEFAULT/disk_allocation_ratio': value => $disk_allocation_ratio;
81 'DEFAULT/max_io_ops_per_host': value => $max_io_ops_per_host;
82 'DEFAULT/max_instances_per_host': value => $max_instances_per_host;
83 'DEFAULT/ram_allocation_ratio': value => $ram_allocation_ratio;
84 'DEFAULT/scheduler_available_filters': value => $scheduler_available_filters;
85 'DEFAULT/scheduler_weight_classes': value => $scheduler_weight_classes
87 if ($scheduler_default_filters) {
88 nova_config { 'DEFAULT/scheduler_default_filters': value => join($scheduler_default_filters,',')
91 nova_config { 'DEFAULT/scheduler_default_filters': ensure => absent
94 if ($isolated_images) {
96 'DEFAULT/isolated_images': value => join($isolated_images,',')
100 'DEFAULT/isolated_images': ensure => absent
103 if ($isolated_hosts) {
105 'DEFAULT/isolated_hosts': value => join($isolated_hosts,',')
109 'DEFAULT/isolated_hosts': ensure => absent