Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Multi-process support, drain commands, etc... #35

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

gshively11
Copy link
Contributor

  • Most commands now accept an optional process number as the first argument, (e.g. haproxyctl 2 enable all myserver, where 2 is the process number to target).
  • Assumes all stats sockets are assigned an individual process number (ranges not supported).
  • Defaults to process number 1 if nbproc < 2 OR the process number is not provided in the arguments.
  • Removed state restrictions on enable/disable/drain commands. They don't appear to be needed.
  • Updated help text
  • Added drain all commands similar to the existing enable/disable all commands. These commands put servers in a drain state, which is useful for performing rolling deployments.

@zz9pzza
Copy link

zz9pzza commented Sep 4, 2016

+1 on wanting drain

@shey
Copy link

shey commented Dec 9, 2016

+1

…ad. TSometimes a zombie process will stick around after a reload, especially when you are using the peers functionality.
@gshively11
Copy link
Contributor Author

gshively11 commented Feb 13, 2017

Added a reload_kill_zombies <wait_in_sec> command to deal with bugs in haproxy's reload (-sf) command. If you use peers, there are some race conditions that will leave connections in a CLOSE_WAIT state, keeping the old pids alive. It's hard to reproduce, but over the course of a week or two we'll end up having a couple of zombies. This new command will wait X number of seconds before terminating (and killing, if necessary) the old pids if necessary (but only if new processes start and the pidfile is updated with the new pids).

…t/reload the haproxy server should now write server states to the file specified in the haproxy cfg. Only "load-server-state-from-file global" is supported at the moment.
@fmluizao
Copy link

+1 for drain

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants