Puppet Class: nova::scheduler

Defined in:
manifests/scheduler.pp

Overview

Class: nova::scheduler

Install and manage nova scheduler

Parameters:

enabled

(Optional) Whether to run the scheduler service Defaults to true

manage_service

(Optional) Whether to start/stop the service Defaults to true

ensure_package

(Optional) The state of the scheduler package Defaults to ‘present’

workers

(Optional) The amount of scheduler workers. Defaults to $::os_workers

max_attempts

(optional) Maximum number of attempts to schedule an instance Defaults to $::os_service_default

discover_hosts_in_cells_interval

(Optional) This value controls how often (in seconds) the scheduler should attempt to discover new hosts that have been added to cells. Defaults to $::os_service_default

query_placement_for_image_type_support

(Optional) This setting causes the scheduler to ask placement only for compute hosts that support the “disk_format“ of the image used in the request. Defaults to $::os_service_default

limit_tenants_to_placement_aggregate

(Optional) This setting allows to have tenant isolation with placement. It ensures hosts in tenant-isolated host aggregate and availability zones will only be available to specific set of tenants. Defaults to $::os_service_default

placement_aggregate_required_for_tenants

(Optional) This setting controls if a tenant with no aggregate affinity will be allowed to schedule to any availalbe node when “limit_tenants_to_placement_aggregate“ is set to True. If aggregates are used to limit some tenants but not all, then this should be False. If all tenants should be confined via aggregate, then this should be True. Defaults to $::os_service_default

max_placement_results

(Optional) This setting determines the maximum limit on results received from the placement service during a scheduling operation. Defaults to $::os_service_default

enable_isolated_aggregate_filtering

(Optional) This setting allows the scheduler to restrict hosts in aggregates based on matching required traits in the aggregate metadata and the instance flavor/image. Defaults to $::os_service_default

query_placement_for_routed_network_aggregates

(Optional) This setting allows to enable the scheduler to filter compute hosts affined to routed network segment aggregates. Defaults to $::os_service_default

DEPRECATED PARAMETERS

periodic_task_interval

(Optional) This value controls how often (in seconds) to run periodic tasks in the scheduler. The specific tasks that are run for each period are determined by the particular scheduler being used. Defaults to undef

query_placement_for_availability_zone

(Optional) This setting allows the scheduler to look up a host aggregate with metadata key of availability zone set to the value provided by incoming request, and request result from placement be limited to that aggregate. Defaults to undef

Parameters:

  • enabled (Any) (defaults to: true)
  • manage_service (Any) (defaults to: true)
  • ensure_package (Any) (defaults to: 'present')
  • workers (Any) (defaults to: $::os_workers)
  • max_attempts (Any) (defaults to: $::os_service_default)
  • discover_hosts_in_cells_interval (Any) (defaults to: $::os_service_default)
  • query_placement_for_image_type_support (Any) (defaults to: $::os_service_default)
  • limit_tenants_to_placement_aggregate (Any) (defaults to: $::os_service_default)
  • placement_aggregate_required_for_tenants (Any) (defaults to: $::os_service_default)
  • max_placement_results (Any) (defaults to: $::os_service_default)
  • enable_isolated_aggregate_filtering (Any) (defaults to: $::os_service_default)
  • query_placement_for_routed_network_aggregates (Any) (defaults to: $::os_service_default)
  • periodic_task_interval (Any) (defaults to: undef)
  • query_placement_for_availability_zone (Any) (defaults to: undef)


84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
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
# File 'manifests/scheduler.pp', line 84

class nova::scheduler(
  $enabled                                       = true,
  $manage_service                                = true,
  $ensure_package                                = 'present',
  $workers                                       = $::os_workers,
  $max_attempts                                  = $::os_service_default,
  $discover_hosts_in_cells_interval              = $::os_service_default,
  $query_placement_for_image_type_support        = $::os_service_default,
  $limit_tenants_to_placement_aggregate          = $::os_service_default,
  $placement_aggregate_required_for_tenants      = $::os_service_default,
  $max_placement_results                         = $::os_service_default,
  $enable_isolated_aggregate_filtering           = $::os_service_default,
  $query_placement_for_routed_network_aggregates = $::os_service_default,
  # DEPRECATED PARAMETERS
  $periodic_task_interval                        = undef,
  $query_placement_for_availability_zone         = undef,
) {

  include nova::deps
  include nova::db
  include nova::params
  include nova::availability_zone

  if $periodic_task_interval != undef {
    warning('The periodic_task_interval parameter is depreated and has no effect')
  }

  if $query_placement_for_availability_zone != undef {
    warning('The query_placement_for_availability_zone parameter is deprecated.')
  }
  $query_placement_for_availability_zone_real = pick($query_placement_for_availability_zone, $::os_service_default)

  nova::generic_service { 'scheduler':
    enabled        => $enabled,
    manage_service => $manage_service,
    package_name   => $::nova::params::scheduler_package_name,
    service_name   => $::nova::params::scheduler_service_name,
    ensure_package => $ensure_package,
  }

  nova_config {
    'scheduler/workers':                                       value => $workers;
    'scheduler/max_attempts':                                  value => $max_attempts;
    'scheduler/discover_hosts_in_cells_interval':              value => $discover_hosts_in_cells_interval;
    'scheduler/query_placement_for_image_type_support':        value => $query_placement_for_image_type_support;
    'scheduler/limit_tenants_to_placement_aggregate':          value => $limit_tenants_to_placement_aggregate;
    'scheduler/placement_aggregate_required_for_tenants':      value => $placement_aggregate_required_for_tenants;
    'scheduler/max_placement_results':                         value => $max_placement_results;
    'scheduler/enable_isolated_aggregate_filtering':           value => $enable_isolated_aggregate_filtering;
    'scheduler/query_placement_for_availability_zone':         value => $query_placement_for_availability_zone_real;
    'scheduler/query_placement_for_routed_network_aggregates': value => $query_placement_for_routed_network_aggregates;
  }

  nova_config {
    'scheduler/periodic_task_interval': ensure => absent;
  }
}