scheduler.pp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # == Class: nova::scheduler
  2. #
  3. # Install and manage nova scheduler
  4. #
  5. # === Parameters:
  6. #
  7. # [*enabled*]
  8. # (optional) Whether to run the scheduler 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 scheduler package
  17. # Defaults to 'present'
  18. #
  19. # [*scheduler_driver*]
  20. # (optional) Default driver to use for the scheduler
  21. # Defaults to 'filter_scheduler'
  22. #
  23. class nova::scheduler(
  24. $enabled = true,
  25. $manage_service = true,
  26. $ensure_package = 'present',
  27. $scheduler_driver = 'filter_scheduler',
  28. ) {
  29. include ::nova::deps
  30. include ::nova::db
  31. include ::nova::params
  32. nova::generic_service { 'scheduler':
  33. enabled => $enabled,
  34. manage_service => $manage_service,
  35. package_name => $::nova::params::scheduler_package_name,
  36. service_name => $::nova::params::scheduler_service_name,
  37. ensure_package => $ensure_package,
  38. }
  39. nova_config {
  40. 'scheduler/driver': value => $scheduler_driver;
  41. }
  42. # TODO(aschultz): old options, remove in P
  43. nova_config {
  44. 'DEFAULT/scheduler_driver': ensure => 'absent';
  45. }
  46. }