6d4ff50c5b
In order to standardize the way dbsync are run across our modules, we create a new class neutron::db::sync. This class will be included if sync_db is enabled. By making this transition the neutron::db::sync class can be returned by the ENC. A use case would be in an highly available environment with 3 galera nodes, include neutron::server on every node with sync_db set to false and have the ENC return ceilometer::db::sync just for one node. Change-Id: I81e824e3e9e8f901b2a0084c7a5ec42c53781864
21 lines
673 B
Puppet
21 lines
673 B
Puppet
#
|
|
# Class to execute neutron dbsync
|
|
#
|
|
class neutron::db::sync {
|
|
|
|
include ::neutron::params
|
|
|
|
Package<| title == 'neutron-server' |> -> Exec['neutron-db-sync']
|
|
Package<| title == 'neutron' |> -> Exec['neutron-db-sync']
|
|
Neutron_config<||> ~> Exec['neutron-db-sync']
|
|
Neutron_config<| title == 'database/connection' |> ~> Exec['neutron-db-sync']
|
|
Exec['neutron-db-sync'] ~> Service <| title == 'neutron-server' |>
|
|
|
|
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,
|
|
}
|
|
}
|