From 9e98fa3cec32bc992c59dc0f8853496ac18ba23e Mon Sep 17 00:00:00 2001 From: Matthias Bastian Date: Tue, 14 Aug 2018 16:55:39 +0200 Subject: [PATCH] Improve restarting Apache The previous approach could lead to restarting Apache after Anchor['heat::service::end']. The new approach is already used in other Puppet modules and guarantees restarting Apache between the service anchors. Change-Id: Ia4ccc8a6477f490f42b588b3e6a9d5c0f7ff6d88 --- manifests/api.pp | 3 +-- manifests/api_cfn.pp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/manifests/api.pp b/manifests/api.pp index 9b8ff8cc..e924aba3 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -113,11 +113,10 @@ class heat::api ( enable => false, tag => ['heat-service'], } + Service <| title == 'httpd' |> { tag +> 'heat-service' } # we need to make sure heat-api/eventlet is stopped before trying to start apache Service['heat-api'] -> Service[$service_name] - # the apache service is untagged so add it to the service section manually - Anchor['heat::service::begin'] ~> Service[$service_name] } else { fail("Invalid service_name. Either heat-api/openstack-heat-api for \ running as a standalone service, or httpd for being run by a httpd server") diff --git a/manifests/api_cfn.pp b/manifests/api_cfn.pp index eb67b725..1ef2fe73 100644 --- a/manifests/api_cfn.pp +++ b/manifests/api_cfn.pp @@ -116,11 +116,10 @@ class heat::api_cfn ( enable => false, tag => ['heat-service'], } + Service <| title == 'httpd' |> { tag +> 'heat-service' } # we need to make sure heat-api-cfn/eventlet is stopped before trying to start apache Service['heat-api-cfn'] -> Service[$service_name] - # the apache service is untagged so add it to the service section manually - Anchor['heat::service::begin'] ~> Service[$service_name] } else { fail("Invalid service_name. Either heat-api-cfn/openstack-heat-api-cfn for \ running as a standalone service, or httpd for being run by a httpd server")