Refactor dependency management of apache

This change simplifies how we manage dependency of package, config
and service resource of httpd service.

- Use keystone-service tag to enforce service ordering following
  the other modules

- Do not strictly fit each resources to our dependency steps to
  reduce amount of our own definition.

Change-Id: I806ef6ce1c1674ffa9b07b20965cffd3b7806817
This commit is contained in:
Takashi Kajinami 2021-11-03 11:58:14 +09:00
parent 8a291e2967
commit 651044e4ff
2 changed files with 1 additions and 24 deletions

View File

@ -687,6 +687,7 @@ Support for deploying under eventlet will be dropped as of the M-release of Open
'httpd': {
include apache::params
$service_name_real = $::apache::params::service_name
Service <| title == 'httpd' |> { tag +> 'keystone-service' }
}
default: {
fail("Invalid service_name. Either keystone/openstack-keystone for \

View File

@ -167,30 +167,6 @@ class keystone::wsgi::apache (
include keystone::deps
# TODO(tobias-urdin): This dependency chaining can be moved to keystone::deps
# when we have cleaned up some old eventlet code and users are forced to use
# apache even though it's pretty much enforced today.
# The httpd package is untagged, but needs to have ordering enforced,
# so handle it here rather than in the deps class.
Anchor['keystone::install::begin']
-> Package['httpd']
-> Anchor['keystone::install::end']
# Configure apache during the config phase
Anchor['keystone::config::begin']
-> Apache::Vhost<||>
~> Anchor['keystone::config::end']
# Start the service during the service phase
Anchor['keystone::service::begin']
-> Service['httpd']
-> Anchor['keystone::service::end']
# Notify the service when config changes
Anchor['keystone::config::end']
~> Service['httpd']
::openstacklib::wsgi::apache { 'keystone_wsgi':
servername => $servername,
bind_host => $bind_host,