Hello list, I'm working on an automation around haproxy process lifecycle in master-worker mode. It's working nice but I'm not confident that all premisses I used are correct. Please provide some guidance if I did any wrong assumption, RTFM link is welcome as usual.
First of all I figured out that master cli will "connection refused" after a reload cmd during the start of the new worker. I'm using a unix socket but I assume the behaviour would be the same using ip+port. I'm also using a successful connection as the meaning of a finished reload process, failed or not. Please let me know if there is a way to be notified, I'm retrying to connect within a for-loop and a growing sleep between attempts. Another assumption I made is that if I don't have any worker in the `# workers` list, it means that the last reload failed. I've observed that as soon as the master cli accepts connections again, the new worker is already there provided that the reload didn't fail. I also observed that the `show proc` output isn't that machine-friendly, anyway it's not a big deal, some regex does the job and I'm assuming the lay out is immutable. Maybe I missed some optional json output in the doc? Thanks in advance, ~jm