From 651044e4ff84e08c020352e75a1b72d7cd9de24e Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 3 Nov 2021 11:58:14 +0900 Subject: [PATCH] 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 --- manifests/init.pp | 1 + manifests/wsgi/apache.pp | 24 ------------------------ 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 7e42cc8fd..a62ffbbf5 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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 \ diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index 0ab2a028b..68d80af3c 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -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,