-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Taking the haproxy process id from config.pid file
The haproxy config is updated by providing the new configuration file and old haproxy process id. This starts a new haproxy process letting the old haproxy process to handle the old sessions. New haproxy handles the new sessions. If a new configuration update comes while both old and new haproxy processes are runnning, another haproxy process needs to be started by providing the latest running haproxy process id. In the existing update code, the haproxy process id is found by "ps" output. This is resulating in not getting the latest haproxy process id, but an older process id. This is leading to second haproxy process never getting killed leaving two haproxies running for ever. The latest haproxy process that is handling the new session is always updated in a file by haproxy itself. As a fix, this process id used to start a new haproxy rather taking the pid from "ps". When the loadbalancer VIP is deleted, Agent deletes the directory where haproxy config file, stats file and pid file are stored. This can result in vrouter_netns.py script failing as pid is not found to stop the haproxy. To overcome this, the config file, pid file and sock file are stored not in an explicit directory corresponding to the pool. Only config fike and sock file are deleted by Agent and pid file is deleted by vrouter_netns script. Change-Id: Id7e1a74a4f076f02c052f860ab5b183adf950640 closes-bug: #1495702
- Loading branch information
1 parent
b08912f
commit 2bfbb46
Showing
5 changed files
with
65 additions
and
47 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
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