From 4df9382252d1c6b37cb2c0f7efe7139bda6cea0f Mon Sep 17 00:00:00 2001 From: Matthias Bastian Date: Fri, 6 Jul 2018 14:14:44 +0200 Subject: [PATCH] Notify not only aodh-api service but also apache Not only the aodh-api service is notified but also the apache service if the API is run using apache. This ensures apache is restarted on config changes. Change-Id: I3967584431c547c2431c9b614de9db6416169567 --- manifests/api.pp | 4 +++- releasenotes/notes/restart-apache-4c85888a2bafbaa8.yaml | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/restart-apache-4c85888a2bafbaa8.yaml diff --git a/manifests/api.pp b/manifests/api.pp index 0eff8702..b00e7c6c 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -112,7 +112,9 @@ class aodh::api ( } # we need to make sure aodh-api/eventlet is stopped before trying to start apache - Service['aodh-api'] -> Service[$service_name] + Service['aodh-api'] -> Service[$::apache::params::service_name] + # the apache service is untagged so add it to the service section manually + Anchor['aodh::service::begin'] ~> Service[$::apache::params::service_name] } else { fail("Invalid service_name. Either aodh/openstack-aodh-api for running \ as a standalone service, or httpd for being run by a httpd server") diff --git a/releasenotes/notes/restart-apache-4c85888a2bafbaa8.yaml b/releasenotes/notes/restart-apache-4c85888a2bafbaa8.yaml new file mode 100644 index 00000000..ca19cfbe --- /dev/null +++ b/releasenotes/notes/restart-apache-4c85888a2bafbaa8.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - Deal with API being run using Apache when restarting the API (e.g. due to + configuration changes)