Clayton O'Neill fdf49deed8 dbsync should only notify services that use the db
When db-sync is run, only services that that talk to the database need
to be restarted.  This introduces a new tag for that type of services
(neturon-db-sync-service).  Currently only neutron-server talks to mysql
directly, so it is the only service with this tag applied.

Change-Id: I0ac15865b408fe9acb643e800836da8b3eeb7827
2015-10-05 21:10:14 +00:00

21 lines
619 B
Puppet

#
# Class to execute neutron dbsync
#
class neutron::db::sync {
include ::neutron::params
Package<| tag == 'neutron-package' |> ~> Exec['neutron-db-sync']
Exec['neutron-db-sync'] ~> Service <| tag == 'neutron-db-sync-service' |>
Neutron_config<||> ~> Exec['neutron-db-sync']
Neutron_config<| title == 'database/connection' |> ~> Exec['neutron-db-sync']
exec { 'neutron-db-sync':
command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head',
path => '/usr/bin',
refreshonly => true,
logoutput => on_failure,
}
}