Refactor resource dependencies
This refactors resource dependencies to improve the following points. - Avoid unnecessary dependencies across services. For example aodh service does not require cinder db. - Restart only api service when config files like paste.ini, which are used only be api service is changed. Change-Id: If2cbbc392bd54d906c7a4f51f1c7cfca69463aaf
This commit is contained in:
parent
c9da9cf718
commit
da507fc631
|
@ -176,8 +176,17 @@ class designate::api (
|
|||
Service['designate-api'] -> Service[$service_name]
|
||||
$service_name_real = false
|
||||
Service <| title == 'httpd' |> { tag +> 'designate-service' }
|
||||
|
||||
# On any paste-api.ini config change, we must restart Designate API.
|
||||
Designate_api_paste_ini<||> ~> Service[$service_name]
|
||||
|
||||
} else {
|
||||
$service_name_real = $service_name
|
||||
|
||||
# On any paste-api.ini config change, we must restart Designate API.
|
||||
Designate_api_paste_ini<||> ~> Service['designate-api']
|
||||
# On any uwsgi config change, we must restart Designate API.
|
||||
Designate_api_uwsgi_config<||> ~> Service['designate-api']
|
||||
}
|
||||
} else {
|
||||
$service_name_real = $service_name
|
||||
|
|
|
@ -34,4 +34,8 @@ class designate::coordination (
|
|||
'coordination/heartbeat_interval': value => $heartbeat_interval;
|
||||
'coordination/run_watchers_interval': value => $run_watchers_interval;
|
||||
}
|
||||
|
||||
# all coordination settings should be applied and all packages should be
|
||||
# installed before service startup
|
||||
Oslo::Coordination['designate_config'] -> Anchor['designate::service::begin']
|
||||
}
|
||||
|
|
|
@ -82,4 +82,7 @@ class designate::db (
|
|||
include designate::db::sync
|
||||
}
|
||||
|
||||
# all db settings should be applied and all packages should be installed
|
||||
# before dbsync starts
|
||||
Oslo::Db['designate_config'] -> Anchor['designate::dbsync::begin']
|
||||
}
|
||||
|
|
|
@ -24,24 +24,13 @@ class designate::deps {
|
|||
~> Service<| tag == 'designate-service' |>
|
||||
~> anchor { 'designate::service::end': }
|
||||
|
||||
# all coordination settings should be applied and all packages should be
|
||||
# installed before service startup
|
||||
Oslo::Coordination<||> -> Anchor['designate::service::begin']
|
||||
|
||||
# paste-api.ini config should occur in the config block also.
|
||||
Anchor['designate::config::begin']
|
||||
-> Designate_api_paste_ini<||>
|
||||
~> Anchor['designate::config::end']
|
||||
|
||||
# policy config should occur in the config block also.
|
||||
Anchor['designate::config::begin']
|
||||
-> Openstacklib::Policy<| tag == 'designate' |>
|
||||
-> Anchor['designate::config::end']
|
||||
|
||||
# On any uwsgi config change, we must restart Designate APIs.
|
||||
Anchor['designate::config::begin']
|
||||
-> Designate_api_uwsgi_config<||>
|
||||
~> Anchor['designate::config::end']
|
||||
-> Anchor['designate::config::end']
|
||||
|
||||
# Installation or config changes will always restart services.
|
||||
Anchor['designate::install::end'] ~> Anchor['designate::service::begin']
|
||||
|
|
|
@ -284,4 +284,6 @@ class designate::keystone::authtoken(
|
|||
service_type => $service_type,
|
||||
interface => $interface;
|
||||
}
|
||||
|
||||
Keystone::Resource::Authtoken['designate_config'] -> Anchor['designate::config::end']
|
||||
}
|
||||
|
|
|
@ -70,6 +70,11 @@ class designate::policy (
|
|||
|
||||
create_resources('openstacklib::policy', { $policy_path => $policy_parameters })
|
||||
|
||||
# policy config should occur in the config block also.
|
||||
Anchor['designate::config::begin']
|
||||
-> Openstacklib::Policy[$policy_path]
|
||||
-> Anchor['designate::config::end']
|
||||
|
||||
oslo::policy { 'designate_config':
|
||||
enforce_scope => $enforce_scope,
|
||||
enforce_new_defaults => $enforce_new_defaults,
|
||||
|
|
Loading…
Reference in New Issue