puppet-nova/manifests/db/online_data_migrations.pp
marios 50c1733e79 Add a class to run the db online_data_migrations
This adds support for running the online_data_migrations
which needs to happen after a dbsync when you upgrade to
Newton.

Change-Id: Ibb119c280b5b6d07db06a63dd9efcc2526355f5f
Related-Bug: 1656791
2017-01-26 13:11:51 +00:00

40 lines
1.0 KiB
Puppet

#
# Class to execute nova api_db sync
#
# ==Parameters
#
# [*extra_params*]
# (optional) String of extra command line parameters to append
# to the nova-manage db sync command. These will be inserted in
# the command line between 'nova-manage' and 'db sync'.
# Defaults to undef
#
# [*db_sync_timeout*]
# (optional) Timeout for the execution of the db_sync
# Defaults to 300.
#
class nova::db::online_data_migrations(
$extra_params = undef,
$db_sync_timeout = 300,
) {
include ::nova::deps
include ::nova::params
exec { 'nova-db-online-data-migrations':
command => "/usr/bin/nova-manage ${extra_params} db online_data_migrations",
refreshonly => true,
try_sleep => 5,
tries => 10,
timeout => $db_sync_timeout,
logoutput => on_failure,
subscribe => [
Anchor['nova::install::end'],
Anchor['nova::config::end'],
Anchor['nova::dbsync_api::end'],
Anchor['nova::db_online_data_migrations::begin']
],
notify => Anchor['nova::db_online_data_migrations::end'],
}
}