Undercloud/Certmonger: Only attempt to reload haproxy is it's active
Previously, certmonger tried to reload haproxy every time after a
certificate is requested. This is useful for certificate resubmits or
renewals. However, it turned out problematic on installation, when
haproxy is not yet active, as it would try many times and end up having
a race-condition with puppet.
This checks if haproxy is active and only then will it attempt to reload
it.
Closes-Bug: #1712377
Change-Id: I4edd42b888a0bbbb8eb0e71f5c17750bac46c2ce
(cherry picked from commit fe25c53fe9
)
This commit is contained in:
parent
976ef0146b
commit
830554939b
|
@ -24,4 +24,6 @@ getcert resubmit -i "$REQUEST_NICKNAME" -w -v -U id-kp-clientAuth \
|
|||
-U id-kp-serverAuth
|
||||
|
||||
cat $CERT_FILE $KEY_FILE > $OUTPUT_FILE
|
||||
systemctl reload haproxy
|
||||
if systemctl -q is-active haproxy; then
|
||||
systemctl reload haproxy
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue