Merge "Refactor resource dependencies"
This commit is contained in:
commit
8e4ccdfe04
|
@ -588,6 +588,12 @@ enabled_backends instead.')
|
|||
hasrestart => true,
|
||||
tag => 'glance-service',
|
||||
}
|
||||
|
||||
# On any paste-api.ini config change, we must restart Glance API.
|
||||
Glance_api_paste_ini<||> ~> Service['glance-api']
|
||||
# On any uwsgi config change, we must restart Glance API.
|
||||
Glance_api_uwsgi_config<||> ~> Service['glance-api']
|
||||
|
||||
} elsif $service_name == 'httpd' {
|
||||
service { 'glance-api':
|
||||
ensure => 'stopped',
|
||||
|
@ -599,6 +605,10 @@ enabled_backends instead.')
|
|||
|
||||
# we need to make sure glance-api/eventlet is stopped before trying to start apache
|
||||
Service['glance-api'] -> Service[$service_name]
|
||||
|
||||
# On any paste-api.ini config change, we must restart Glance API.
|
||||
Glance_api_paste_ini<||> ~> Service['glance-api']
|
||||
|
||||
} else {
|
||||
fail("Invalid service_name. ${::glance::params::api_service_name} for \
|
||||
running as a standalone service, or httpd for being run by a httpd server")
|
||||
|
|
|
@ -278,5 +278,7 @@ class glance::api::authtoken(
|
|||
service_token_roles_required => $service_token_roles_required,
|
||||
service_type => $service_type,
|
||||
interface => $interface;
|
||||
}
|
||||
}
|
||||
|
||||
Keystone::Resource::Authtoken['glance_api_config'] -> Anchor['glance::config::end']
|
||||
}
|
||||
|
|
|
@ -68,4 +68,8 @@ class glance::api::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['glance_api_config'] -> Anchor['glance::dbsync::begin']
|
||||
}
|
||||
|
|
|
@ -24,19 +24,13 @@ class glance::deps {
|
|||
~> Service<| tag == 'glance-service' |>
|
||||
~> anchor { 'glance::service::end': }
|
||||
|
||||
# all db settings should be applied and all packages should be installed
|
||||
# before dbsync starts
|
||||
Oslo::Db<||> -> Anchor['glance::dbsync::begin']
|
||||
|
||||
# policy config should occur in the config block also.
|
||||
Anchor['glance::config::begin']
|
||||
-> Openstacklib::Policy<| tag == 'glance' |>
|
||||
-> Anchor['glance::config::end']
|
||||
|
||||
# On any uwsgi config change, we must restart Glance API.
|
||||
Anchor['glance::config::begin']
|
||||
-> Glance_api_uwsgi_config<||>
|
||||
~> Anchor['glance::config::end']
|
||||
-> Anchor['glance::config::end']
|
||||
|
||||
Anchor['glance::config::begin']
|
||||
-> Glance_api_paste_ini<||>
|
||||
-> Anchor['glance::config::end']
|
||||
|
||||
# We need openstackclient before marking service end so that glance
|
||||
# will have clients available to create resources. This tag handles the
|
||||
|
@ -46,7 +40,6 @@ class glance::deps {
|
|||
-> Anchor['glance::service::end']
|
||||
|
||||
# All other inifile providers need to be processed in the config block
|
||||
Anchor['glance::config::begin'] -> Glance_api_paste_ini<||> ~> Anchor['glance::config::end']
|
||||
Anchor['glance::config::begin'] -> Glance_image_import_config<||> ~> Anchor['glance::config::end']
|
||||
Anchor['glance::config::begin'] -> Glance_swift_config<||> ~> Anchor['glance::config::end']
|
||||
Anchor['glance::config::begin'] -> Glance_rootwrap_config<||> ~> Anchor['glance::config::end']
|
||||
|
|
|
@ -70,6 +70,11 @@ class glance::policy (
|
|||
|
||||
create_resources('openstacklib::policy', { $policy_path => $policy_parameters })
|
||||
|
||||
# policy config should occur in the config block also.
|
||||
Anchor['glance::config::begin']
|
||||
-> Openstacklib::Policy[$policy_path]
|
||||
-> Anchor['glance::config::end']
|
||||
|
||||
oslo::policy { 'glance_api_config':
|
||||
enforce_scope => $enforce_scope,
|
||||
enforce_new_defaults => $enforce_new_defaults,
|
||||
|
|
|
@ -33,7 +33,6 @@ describe 'glance::policy' do
|
|||
:file_group => 'glance',
|
||||
:file_format => 'yaml',
|
||||
:purge_config => false,
|
||||
:tag => 'glance',
|
||||
)
|
||||
is_expected.to contain_oslo__policy('glance_api_config').with(
|
||||
:enforce_scope => false,
|
||||
|
@ -64,7 +63,6 @@ describe 'glance::policy' do
|
|||
:file_group => 'glance',
|
||||
:file_format => 'yaml',
|
||||
:purge_config => true,
|
||||
:tag => 'glance',
|
||||
)
|
||||
is_expected.to contain_oslo__policy('glance_api_config').with(
|
||||
:enforce_scope => false,
|
||||
|
|
Loading…
Reference in New Issue