Score:1

HAProxy APIs - Reload Config

cn flag

I notice there are two APIs for HaProxy. DataPlane and Runtime.

I don't see anything obvious that will just tell the system to reload and parse the .cfg file.

Seems like a no brainer thing to want to do. I have a lets encrypt container running in docker and I want to just, via https, or some mechanism tell HaProxy to reload the ssl certs or in general load up a changed .cfg file.

I'm aware of the individual SSL reload commands, which will implement if no other good solutions. Also of course I could extend the haproxy container to add some kind of custom api to kick it.

Ps. I don't have enough traffic to warrant the zero packet loss yelp solution ;-)

cn flag
Ok, it seems the dataplane api has the ability to push a new config file ? I take it that Enterprise only ? and requiring money.
Score:2
jp flag

There is a so-called Master CLI socket that allows initiating a reload.

echo "reload" | socat /var/run/haproxy-master.sock

This socket can be configured to listen on a TCP port

 haproxy -W -S 127.0.0.1:1234

It is available in the non-commercial version.

cn flag
Thanks a lot. Sounds perfect, I will give it a go.
cn flag
I have now tried this. It gives zero feedback. Also, the certs do not get picked up. Any ideas ?? If I send "help" it talks about sending a command to @master ... should I be doing that ?". There are also levels, user and admin, which one should I use.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.