From f10256ae3e2bb3a78f480f775f30c011da7b1c1a Mon Sep 17 00:00:00 2001 From: Andreas Jaekel Date: Tue, 10 Jul 2018 17:55:37 +0200 Subject: [PATCH] Notify not only heat-api service but also apache Not only the heat-api and heat-api-cfn services are notified, but also the apache service if the API is run using apache. This ensures apache is restarted on config changes. Change-Id: I68feb50a466b56b027573cda099191f6b26ddbfd --- manifests/api.pp | 4 +++- manifests/api_cfn.pp | 4 +++- releasenotes/notes/restart-apache-fa203227fefc67f8.yaml | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/restart-apache-fa203227fefc67f8.yaml diff --git a/manifests/api.pp b/manifests/api.pp index 1123cd2a..515a48e6 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -115,7 +115,9 @@ class heat::api ( } # we need to make sure heat-api/eventlet is stopped before trying to start apache - Service['heat-api'] -> Service[$service_name] + Service['heat-api'] -> Service[$::apache::params::service_name] + # the apache service is untagged so add it to the service section manually + Anchor['heat::service::begin'] ~> Service[$::apache::params::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 20fc35c5..69214051 100644 --- a/manifests/api_cfn.pp +++ b/manifests/api_cfn.pp @@ -118,7 +118,9 @@ class heat::api_cfn ( } # we need to make sure heat-api-cfn/eventlet is stopped before trying to start apache - Service['heat-api-cfn'] -> Service[$service_name] + Service['heat-api-cfn'] -> Service[$::apache::params::service_name] + # the apache service is untagged so add it to the service section manually + Anchor['heat::service::begin'] ~> Service[$::apache::params::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") diff --git a/releasenotes/notes/restart-apache-fa203227fefc67f8.yaml b/releasenotes/notes/restart-apache-fa203227fefc67f8.yaml new file mode 100644 index 00000000..ca19cfbe --- /dev/null +++ b/releasenotes/notes/restart-apache-fa203227fefc67f8.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - Deal with API being run using Apache when restarting the API (e.g. due to + configuration changes)