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

Adds ability to deregister a service based on critical check state longer than a timeout. #2276

Merged
merged 4 commits into from
Aug 16, 2016

Conversation

slackpad
Copy link
Contributor

@slackpad slackpad commented Aug 16, 2016

Inspired by #1432 and #1433, this adds a new deregister_critical_service_after field to a health check definition (all check types are supported) which causes the service associated with that check to get deregistered if the check is critical for longer than the timeout.

Closes #679.

// reapServices is a long running goroutine that looks for checks that have been
// critical too long and dregisters their associated services.
func (a *Agent) reapServices() {
reap := func() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just move this out to a named function

@dwelch2344
Copy link

@sroskelley we'll need to keep an eye on when this drops, as it'll alleviate some of the problems we went over today :)

Great work all!

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

Successfully merging this pull request may close these issues.

3 participants