From: Juan Antonio Osorio Robles Date: Wed, 26 Oct 2016 16:38:55 +0000 (+0300) Subject: Reload haproxy if any configuration changes on HA X-Git-Tag: opnfv-6.0.0~506^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=c01acb0c4930ecbef7de1ed876afa6120fe2ee35;p=apex-puppet-tripleo.git Reload haproxy if any configuration changes on HA In some cases, for instance, when updating from a non-SSL setup in HAProxy to an SSL setup, we don't reload haproxy's configuration. This is problematic since we need HAProxy to serve the certificates and the new endpoints. This forces the reload when puppet notices changes. Change-Id: Ie1dd809e6beef33fadad48de55e488219fb7d686 Closes-Bug: #1636921 --- diff --git a/manifests/profile/base/haproxy.pp b/manifests/profile/base/haproxy.pp index afeb8c0..f16ec1b 100644 --- a/manifests/profile/base/haproxy.pp +++ b/manifests/profile/base/haproxy.pp @@ -95,7 +95,7 @@ class tripleo::profile::base::haproxy ( command => 'systemctl reload haproxy', path => ['/usr/bin', '/usr/sbin'], refreshonly => true, - onlyif => 'pcs property | grep -q "maintenance-mode.*true"', + onlyif => 'systemctl is-active haproxy | grep -q active', subscribe => Class['::haproxy'] } Haproxy::Listen<||> ~> Exec['haproxy-reload']