Alex Schultz 3653345f1c Fix upgrade command
Make our upgrade class match devstack.
2d98d5e743/devstack/lib/watcher (L238)

Change-Id: I02ce5e52f78282c394b086b8643655dbe226bd68
2017-05-17 22:42:58 +00:00

34 lines
922 B
Puppet

#
# Class to execute watcher-db-manage upgrade
# It's because watcher-db-manage doesn't support sync db.
#
# == Parameters
#
# [*extra_params*]
# (optional) String of extra command line parameters to append
# to the watcher-db-manage upgrade command.
# Defaults to '--config-file /etc/watcher/watcher.conf'
#
class watcher::db::upgrade(
$extra_params = '--config-file /etc/watcher/watcher.conf',
) {
include ::watcher::deps
exec { 'watcher-db-manage-upgrade':
command => "watcher-db-manage ${extra_params} upgrade head",
path => '/usr/bin',
user => 'watcher',
refreshonly => true,
logoutput => on_failure,
subscribe => [
Anchor['watcher::install::end'],
Anchor['watcher::config::end'],
Anchor['watcher::db::create_schema::end'],
Anchor['watcher::db::upgrade::begin']
],
notify => Anchor['watcher::db::upgrade::end'],
}
}