File: conductor.pp

package info (click to toggle)
puppet-module-nova 25.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,100 kB
  • sloc: ruby: 11,433; python: 38; sh: 10; makefile: 10
file content (55 lines) | stat: -rw-r--r-- 1,672 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# == Class: nova::conductor
#
# Manages nova conductor package and service
#
# === Parameters:
#
# [*enabled*]
#   (optional) Whether to enable the nova-conductor service
#   Defaults to true
#
# [*manage_service*]
#   (optional) Whether to start/stop the service
#   Defaults to true
#
# [*ensure_package*]
#   (optional) The state of the nova conductor package
#   Defaults to 'present'
#
# [*workers*]
#   (optional) Number of workers for OpenStack Conductor service
#   Defaults to $facts['os_workers']
#
# [*enable_new_services*]
#   (optional) When a new service (for example "nova-compute") start up, it gets
#   registered in the database as an enabled service. Setting this to false will
#   cause new services to be disabled when added. This config option is only used
#   by the conductor service which is responsible for creating the service entries.
#   Defaults to $facts['os_service_default']
#
class nova::conductor(
  Boolean $enabled        = true,
  Boolean $manage_service = true,
  $ensure_package         = 'present',
  $workers                = $facts['os_workers'],
  $enable_new_services    = $facts['os_service_default'],
) {

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

  nova::generic_service { 'conductor':
    enabled        => $enabled,
    manage_service => $manage_service,
    package_name   => $::nova::params::conductor_package_name,
    service_name   => $::nova::params::conductor_service_name,
    ensure_package => $ensure_package,
  }

  nova_config {
    'conductor/workers':           value => $workers;
    'DEFAULT/enable_new_services': value => $enable_new_services
  }
}