dataplaneapi icon indicating copy to clipboard operation
dataplaneapi copied to clipboard

haproxy reload config using API or Webhook possible?

Open kevev opened this issue 3 years ago • 2 comments

I am able to update frontend and backend config lines using data plane api, but I would also like to reload the haproxy config via a web call. This needs to perform the same as doing local command systemctl haproxy reload. The reason I need this is that sometimes haproxy does not detect the changes made to haproxy.cfg via the data plane api, and I am trying to avoid having to ssh into the server to reload haproxy every time. Is there a way to perform haproxy reload via an API or Webhook?

kevev avatar Jan 23 '22 19:01 kevev

I have created a cronjob that performs a cksum on /etc/haproxy/haproxy.cfg that seems to be working for now. But if anyone has any better ideas, please let me know. :)

kevev avatar Jan 23 '22 20:01 kevev

Hi @kevev, we don't have this supported for now, the workaround would be calling /services/haproxy/configuration/raw with ?force_reload qs parameter.

In which cases does HAProxy miss a reload when configuration changes? As this should not happen.

mjuraga avatar Feb 10 '22 10:02 mjuraga