diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-08-31 15:48:12 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-08-31 15:48:12 +0000 |
commit | ffa77971d7f3a161b79d4bc05d7c010ddacda088 (patch) | |
tree | 11e82dcefd7acf9da09d9c44aae9ca6b1787f07c /manifests/profile/base | |
parent | 224b918eefc7193e4e5dbe6e0055e2be2b3f121f (diff) | |
parent | d30e9bcc067c432fe93519dc5971ea98866a10cb (diff) |
Merge "Reload HAProxy on refresh"
Diffstat (limited to 'manifests/profile/base')
-rw-r--r-- | manifests/profile/base/haproxy.pp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/manifests/profile/base/haproxy.pp b/manifests/profile/base/haproxy.pp index 4f2f850..68ff3e4 100644 --- a/manifests/profile/base/haproxy.pp +++ b/manifests/profile/base/haproxy.pp @@ -82,6 +82,20 @@ class tripleo::profile::base::haproxy ( } include ::tripleo::haproxy + + unless hiera('tripleo::haproxy::haproxy_service_manage', true) { + # Reload HAProxy configuration if the haproxy class has refreshed or any + # HAProxy frontend endpoint has changed. + exec { 'haproxy-reload': + command => 'systemctl reload haproxy', + path => ['/usr/bin', '/usr/sbin'], + refreshonly => true, + onlyif => 'pcs property | grep -q "maintenance-mode.*true"', + subscribe => Class['::haproxy'] + } + Haproxy::Listen<||> ~> Exec['haproxy-reload'] + Haproxy::Balancermember<||> ~> Exec['haproxy-reload'] + } } } |