forked from haproxy/haproxy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MINOR: cli/wait: add a condition to wait on a server to become unused
The "wait" command now supports a condition, "srv-unused", which waits for the designated server to become totally unused, indicating that it is removable. Upon each wakeup it calls srv_check_for_deletion() to verify if conditions are met, if not if it's recoverable, or if it's not recoverable, and proceeds according to this, never waiting for a final decision longer than the configured delay. The purpose is to make it possible to remove servers from the CLI after waiting for their sessions to be terminated: $ socat -t5 /path/to/socket - <<< " disable server px/srv1 shutdown sessions server px/srv1 wait 2s srv-unused px/srv1 del server px/srv1" Or even wait for connections to terminate themselves: $ socat -t70 /path/to/socket - <<< " disable server px/srv1 wait 1m srv-unused px/srv1 del server px/srv1"
- Loading branch information
Showing
3 changed files
with
79 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters