1

We have few application server and 2 load-balanders (HAProxy). Cloud in implemented with SaltStack. When there is need to disable certain app server, we log into salt master and run:

for i in {1..20}; do salt '*.lb-app' haproxy.disable_server 1.app app; done

Since haproxy is running with nbproc 4, only one call doesn't switch the traffic. So by calling is 20 time there is a decent probability that all 4 processes will disable given server.

I was wondering if there is more elegant solution.

Horkyze
  • 151
  • 1
  • 4

0 Answers0