Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pid changes? #19

Open
jkrauska opened this issue Dec 13, 2017 · 1 comment
Open

pid changes? #19

jkrauska opened this issue Dec 13, 2017 · 1 comment

Comments

@jkrauska
Copy link

haproxy supports lightweight restarts which generate a new pid and take over the work of the previous process.

In this case, the active PID changes, but I've seen chaperone not updating the active pid when given a pidfile.

(sometimes it seems to honor the change, othertimes not)

Any clue on a timer what chaperone looks at the pid file?

@garywiz
Copy link
Owner

garywiz commented Dec 13, 2017

Ahh, OK. Yes, Chaperone will probably not notice the change in PID. When you specify a pidfile, Chaperone uses the pidfile only at process start-up time. It waits for the pidfile to appear before considering the process started, and when it sees the pidfile, it ignores the PID that was handed out by the process start-up, assuming that the new PID is the one. It's likely that when haproxy "generates a new PID" it is also terminating the old process, which chaperone is notified about. If it's configured to restart the service, it may actually attempt that. However, it sounds like haproxy is a special case. I wonder if it would make sense to use a "wrapper" script which runs haproxy, and have Chaperone run the wrapper script?

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

No branches or pull requests

2 participants