diff --git a/manifests/api.pp b/manifests/api.pp index 265fbda5..8ff8fb09 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -119,6 +119,11 @@ class aodh::api ( } } + # On any paste-api.ini config change, we must restart Aodh API. + Aodh_api_paste_ini<||> ~> Service[$service_name] + # On any uwsgi config change, we must restart Aodh API. + Aodh_api_uwsgi_config<||> ~> Service[$service_name] + aodh_config { 'api/gnocchi_external_project_owner': value => $gnocchi_external_project_owner; 'api/gnocchi_external_domain_name': value => $gnocchi_external_domain_name; diff --git a/manifests/coordination.pp b/manifests/coordination.pp index ceb1f930..9a56947c 100644 --- a/manifests/coordination.pp +++ b/manifests/coordination.pp @@ -41,4 +41,8 @@ class aodh::coordination ( 'coordination/retry_backoff': value => $retry_backoff; 'coordination/max_retry_interval': value => $max_retry_interval; } + + # all coordination settings should be applied and all packages should be + # installed before service startup + Oslo::Coordination['aodh_config'] -> Anchor['aodh::service::begin'] } diff --git a/manifests/db.pp b/manifests/db.pp index 0753b142..dcf7e7e8 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -74,4 +74,8 @@ class aodh::db ( pool_timeout => $database_pool_timeout, mysql_enable_ndb => $mysql_enable_ndb, } + + # all db settings should be applied and all packages should be installed + # before dbsync starts + Oslo::Db['aodh_config'] -> Anchor['aodh::dbsync::begin'] } diff --git a/manifests/deps.pp b/manifests/deps.pp index 76a26f3c..b8f6452a 100644 --- a/manifests/deps.pp +++ b/manifests/deps.pp @@ -24,28 +24,13 @@ class aodh::deps { ~> Service<| tag == 'aodh-service' |> ~> anchor { 'aodh::service::end': } - # paste-api.ini config should occur in the config block also. Anchor['aodh::config::begin'] -> Aodh_api_paste_ini<||> - ~> Anchor['aodh::config::end'] - - # all coordination settings should be applied and all packages should be - # installed before service startup - Oslo::Coordination<||> -> Anchor['aodh::service::begin'] - - # all db settings should be applied and all packages should be installed - # before dbsync starts - Oslo::Db<||> -> Anchor['aodh::dbsync::begin'] - - # policy config should occur in the config block also. - Anchor['aodh::config::begin'] - -> Openstacklib::Policy<| tag == 'aodh' |> -> Anchor['aodh::config::end'] - # On any uwsgi config change, we must restart Aodh API. Anchor['aodh::config::begin'] -> Aodh_api_uwsgi_config<||> - ~> Anchor['aodh::config::end'] + -> Anchor['aodh::config::end'] # Installation or config changes will always restart services. Anchor['aodh::install::end'] ~> Anchor['aodh::service::begin'] diff --git a/manifests/policy.pp b/manifests/policy.pp index f5915394..ec2ff31c 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -65,11 +65,15 @@ class aodh::policy ( file_group => $::aodh::params::group, file_format => 'yaml', purge_config => $purge_config, - tag => 'aodh', } create_resources('openstacklib::policy', { $policy_path => $policy_parameters }) + # policy config should occur in the config block also. + Anchor['aodh::config::begin'] + -> Openstacklib::Policy[$policy_path] + -> Anchor['aodh::config::end'] + oslo::policy { 'aodh_config': enforce_scope => $enforce_scope, enforce_new_defaults => $enforce_new_defaults, @@ -77,5 +81,4 @@ class aodh::policy ( policy_default_rule => $policy_default_rule, policy_dirs => $policy_dirs, } - } diff --git a/spec/classes/aodh_policy_spec.rb b/spec/classes/aodh_policy_spec.rb index 5af2aab8..0907825d 100644 --- a/spec/classes/aodh_policy_spec.rb +++ b/spec/classes/aodh_policy_spec.rb @@ -33,7 +33,6 @@ describe 'aodh::policy' do :file_group => 'aodh', :file_format => 'yaml', :purge_config => false, - :tag => 'aodh', ) is_expected.to contain_oslo__policy('aodh_config').with( :enforce_scope => false, @@ -64,7 +63,6 @@ describe 'aodh::policy' do :file_group => 'aodh', :file_format => 'yaml', :purge_config => true, - :tag => 'aodh', ) is_expected.to contain_oslo__policy('aodh_config').with( :enforce_scope => false,