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

Poll Agent status when starting #582

Closed
elijahandrews opened this issue Jul 18, 2013 · 2 comments
Closed

Poll Agent status when starting #582

elijahandrews opened this issue Jul 18, 2013 · 2 comments
Assignees

Comments

@elijahandrews
Copy link
Contributor

This affects the Debian and RPM Agent.

Right now when starting the Agent we start supervisor, sleep a fixed period of time (4 seconds on Debian and 7 on Red Hat), then run a check to see if supervisor has started all of the Agent subprocesses successfully. We run into issues when it takes a user's system more than 4/7 seconds to correctly start the Agent, as the init.d script will report that the Agent failed to start when it will have correctly started a few seconds later.

Instead of waiting a fixed period of time to check for running subprocesses, we should have a script that runs the check around once per second for some longer period of time. If it detects that the Agent has started the init.d script will report that the Agent has started successfully. If after the fixed period of time it does not detect that the subprocesses are running the init.d script will report a failure. This will greatly reduce the possibility of the Agent subprocess check running prematurely, and should shave a few seconds off of the Agent's startup time on most machines.

@elijahandrews
Copy link
Contributor Author

6403c68 addresses this issue for Debian. @remh @LotharSee does this look suitable?

@LotharSee
Copy link
Contributor

Looks good to me! This behavior is way better.
I didn't test it but it looks okay.

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