Merge "Refactor resource dependencies"

This commit is contained in:
Zuul 2024-03-04 16:27:14 +00:00 committed by Gerrit Code Review
commit 26d0bf2218
6 changed files with 14 additions and 17 deletions

View File

@ -275,4 +275,7 @@ class keystone::cache(
manage_backend_package => $manage_backend_package, manage_backend_package => $manage_backend_package,
} }
# all cache settings should be applied and all packages should be installed
# before service startup
Oslo::Cache['keystone_config'] -> Anchor['keystone::service::begin']
} }

View File

@ -69,4 +69,7 @@ class keystone::db (
mysql_enable_ndb => $mysql_enable_ndb, mysql_enable_ndb => $mysql_enable_ndb,
} }
# all db settings should be applied and all packages should be installed
# before dbsync starts
Oslo::Db['keystone_config'] -> Anchor['keystone::dbsync::begin']
} }

View File

@ -24,22 +24,8 @@ class keystone::deps {
~> Service<| tag == 'keystone-service' |> ~> Service<| tag == 'keystone-service' |>
~> anchor { 'keystone::service::end': } ~> anchor { 'keystone::service::end': }
# On any uwsgi config change, we must restart Keystone.
Anchor['keystone::config::begin'] Anchor['keystone::config::begin']
-> Keystone_uwsgi_config<||> -> Keystone_uwsgi_config<||>
~> Anchor['keystone::config::end']
# all cache settings should be applied and all packages should be installed
# before service startup
Oslo::Cache<||> -> Anchor['keystone::service::begin']
# all db settings should be applied and all packages should be installed
# before dbsync starts
Oslo::Db<||> -> Anchor['keystone::dbsync::begin']
# policy config should occur in the config block also.
Anchor['keystone::config::begin']
-> Openstacklib::Policy<| tag == 'keystone' |>
-> Anchor['keystone::config::end'] -> Anchor['keystone::config::end']
# Support packages need to be installed in the install phase, but we don't # Support packages need to be installed in the install phase, but we don't

View File

@ -548,6 +548,9 @@ class keystone(
hasrestart => true, hasrestart => true,
tag => 'keystone-service', tag => 'keystone-service',
} }
# On any uwsgi config change, we must restart Keystone.
Keystone_uwsgi_config<||> ~> Service['keystone']
} }
'httpd': { 'httpd': {
include apache::params include apache::params

View File

@ -65,11 +65,15 @@ class keystone::policy (
file_group => $::keystone::params::group, file_group => $::keystone::params::group,
file_format => 'yaml', file_format => 'yaml',
purge_config => $purge_config, purge_config => $purge_config,
tag => 'keystone',
} }
create_resources('openstacklib::policy', { $policy_path => $policy_parameters }) create_resources('openstacklib::policy', { $policy_path => $policy_parameters })
# policy config should occur in the config block also.
Anchor['keystone::config::begin']
-> Openstacklib::Policy[$policy_path]
-> Anchor['keystone::config::end']
oslo::policy { 'keystone_config': oslo::policy { 'keystone_config':
enforce_scope => $enforce_scope, enforce_scope => $enforce_scope,
enforce_new_defaults => $enforce_new_defaults, enforce_new_defaults => $enforce_new_defaults,

View File

@ -33,7 +33,6 @@ describe 'keystone::policy' do
:file_group => 'keystone', :file_group => 'keystone',
:file_format => 'yaml', :file_format => 'yaml',
:purge_config => false, :purge_config => false,
:tag => 'keystone',
) )
is_expected.to contain_oslo__policy('keystone_config').with( is_expected.to contain_oslo__policy('keystone_config').with(
:enforce_scope => false, :enforce_scope => false,
@ -64,7 +63,6 @@ describe 'keystone::policy' do
:file_group => 'keystone', :file_group => 'keystone',
:file_format => 'yaml', :file_format => 'yaml',
:purge_config => true, :purge_config => true,
:tag => 'keystone',
) )
is_expected.to contain_oslo__policy('keystone_config').with( is_expected.to contain_oslo__policy('keystone_config').with(
:enforce_scope => false, :enforce_scope => false,