online_data_migrations.pp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #
  2. # Class to execute nova api_db sync
  3. #
  4. # ==Parameters
  5. #
  6. # [*extra_params*]
  7. # (optional) String of extra command line parameters to append
  8. # to the nova-manage db sync command. These will be inserted in
  9. # the command line between 'nova-manage' and 'db sync'.
  10. # Defaults to undef
  11. #
  12. # [*db_sync_timeout*]
  13. # (optional) Timeout for the execution of the db_sync
  14. # Defaults to 300.
  15. #
  16. class nova::db::online_data_migrations(
  17. $extra_params = undef,
  18. $db_sync_timeout = 300,
  19. ) {
  20. include ::nova::deps
  21. include ::nova::params
  22. exec { 'nova-db-online-data-migrations':
  23. command => "/usr/bin/nova-manage ${extra_params} db online_data_migrations",
  24. refreshonly => true,
  25. try_sleep => 5,
  26. tries => 10,
  27. timeout => $db_sync_timeout,
  28. logoutput => on_failure,
  29. subscribe => [
  30. Anchor['nova::install::end'],
  31. Anchor['nova::config::end'],
  32. Anchor['nova::dbsync_api::end'],
  33. Anchor['nova::db_online_data_migrations::begin']
  34. ],
  35. notify => Anchor['nova::db_online_data_migrations::end'],
  36. }
  37. }