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
This commit is contained in:
parent
544982049e
commit
fdf49deed8
@ -6,7 +6,7 @@ class neutron::db::sync {
|
||||
include ::neutron::params
|
||||
|
||||
Package<| tag == 'neutron-package' |> ~> Exec['neutron-db-sync']
|
||||
Exec['neutron-db-sync'] ~> Service <| tag == 'neutron-service' |>
|
||||
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']
|
||||
|
@ -477,6 +477,6 @@ class neutron::server (
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
require => Class['neutron'],
|
||||
tag => 'neutron-service',
|
||||
tag => ['neutron-service', 'neutron-db-sync-service'],
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ describe 'neutron::server' do
|
||||
:enable => true,
|
||||
:ensure => 'running',
|
||||
:require => 'Class[Neutron]',
|
||||
:tag => 'neutron-service',
|
||||
:tag => ['neutron-service', 'neutron-db-sync-service'],
|
||||
)
|
||||
is_expected.not_to contain_class('neutron::db::sync')
|
||||
is_expected.to contain_neutron_api_config('filter:authtoken/auth_admin_prefix').with(
|
||||
|
Loading…
Reference in New Issue
Block a user