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

Block until service/check sync is attempted from /v1/agent API's #723

Merged
merged 1 commit into from
Feb 23, 2015

Conversation

ryanuber
Copy link
Member

Fixes #231 by blocking the HTTP API responses until a sync has been attempted. This is still a "best-effort" mechanism in that the call to syncChanges() can fail. In this case, the service or check actually is registered with the agent, so it doesn't make sense for the caller to retry. Thus, if we fail a syncChanges(), we only log a warning, but still return the 200-range response to the client. Consul's built-in anti-entropy will take care of syncing the services and checks to the catalog once it is able. This seems like the best we can do.

@armon thoughts on this?

@armon
Copy link
Member

armon commented Feb 23, 2015

LGTM! This is exactly what I thought. Best-effort is really the best we can do.

ryanuber added a commit that referenced this pull request Feb 23, 2015
Block until service/check sync is attempted from /v1/agent API's
@ryanuber ryanuber merged commit bd14b90 into master Feb 23, 2015
@ryanuber ryanuber deleted the f-agent-block branch February 23, 2015 18:56
duckhan pushed a commit to duckhan/consul that referenced this pull request Oct 24, 2021
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.

service health check not immediately available for session
2 participants