
In order to standardize the way dbsync are run across our modules, we create a new class nova::db::sync. This class will be included if sync_db is enabled. By making this transition the nova::db::sync class can be returned by the ENC. A use case would be in an highly available environment, with 3 galera nodes, include nova::api on every node with sync_db set to false and have the ENC return nova::db::sync just for one node. Change-Id: I795178f83fe5b997a2574fe17263643688efc48c
23 lines
532 B
Puppet
23 lines
532 B
Puppet
#
|
|
# Class to execute nova dbsync
|
|
#
|
|
class nova::db::sync {
|
|
|
|
include ::nova::params
|
|
|
|
Package<| tag =='nova-package' |> ~> Exec['nova-db-sync']
|
|
Exec['nova-db-sync'] ~> Service <| tag == 'nova-service' |>
|
|
|
|
Nova_config <||> -> Exec['nova-db-sync']
|
|
Nova_config <| title == 'database/connection' |> ~> Exec['nova-db-sync']
|
|
|
|
Exec<| title == 'post-nova_config' |> ~> Exec['nova-db-sync']
|
|
|
|
exec { 'nova-db-sync':
|
|
command => '/usr/bin/nova-manage db sync',
|
|
refreshonly => true,
|
|
logoutput => on_failure,
|
|
}
|
|
|
|
}
|