conductor.pp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # == Class: nova::conductor
  2. #
  3. # Manages nova conductor package and service
  4. #
  5. # === Parameters:
  6. #
  7. # [*enabled*]
  8. # (optional) Whether to enable the nova-conductor service
  9. # Defaults to true
  10. #
  11. # [*manage_service*]
  12. # (optional) Whether to start/stop the service
  13. # Defaults to true
  14. #
  15. # [*ensure_package*]
  16. # (optional) The state of the nova conductor package
  17. # Defaults to 'present'
  18. #
  19. # [*workers*]
  20. # (optional) Number of workers for OpenStack Conductor service
  21. # Defaults to undef (i.e. parameter will not be present)
  22. #
  23. # [*enable_new_services*]
  24. # (optional) When a new service (for example "nova-compute") start up, it gets
  25. # registered in the database as an enabled service. Setting this to false will
  26. # cause new services to be disabled when added. This config option is only used
  27. # by the conductor service which is responsible for creating the service entries.
  28. # Defaults to $::os_service_default
  29. #
  30. # DEPRECATED PARAMETERS
  31. #
  32. # [*use_local*]
  33. # (optional) Perform nova-conductor operations locally
  34. # Defaults to undef
  35. #
  36. class nova::conductor(
  37. $enabled = true,
  38. $manage_service = true,
  39. $ensure_package = 'present',
  40. $workers = undef,
  41. $enable_new_services = $::os_service_default,
  42. # DEPREACTED PARAMETERS
  43. $use_local = undef,
  44. ) {
  45. if $use_local {
  46. warning('use_local parameter is deprecated, has no effect and will be dropped in a future release.')
  47. }
  48. include ::nova::deps
  49. include ::nova::db
  50. include ::nova::params
  51. nova::generic_service { 'conductor':
  52. enabled => $enabled,
  53. manage_service => $manage_service,
  54. package_name => $::nova::params::conductor_package_name,
  55. service_name => $::nova::params::conductor_service_name,
  56. ensure_package => $ensure_package,
  57. }
  58. if $workers {
  59. nova_config {
  60. 'conductor/workers': value => $workers;
  61. }
  62. }
  63. nova_config {
  64. 'DEFAULT/enable_new_services': value => $enable_new_services
  65. }
  66. }