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

Consule "Services" list includes unhealthy services #73

Open
EugenMayer opened this issue Jul 27, 2018 · 0 comments
Open

Consule "Services" list includes unhealthy services #73

EugenMayer opened this issue Jul 27, 2018 · 0 comments

Comments

@EugenMayer
Copy link

EugenMayer commented Jul 27, 2018

If we think about what is done with Consul and Tiller, we might agree that we will, somehow, generate configurations for each available service in consul and rigister it in a configuration file for some service like nginx / whatever as an upstream server - generating the configuration will be done by tiller.

No, with the current consul_services the health status is not respected, its just all available service, no matter if they answer or not. This collection, together with the use of a live registry like consul will then generated broken upstream services.

I cannot image a single usecase where this makes actual sense.

I would suggest, we either reimplement consul_services to include only health services or we introduce consul_services_healthy as an additional variable for that.

Pseudo code would be somewaht like

   consul_services_healthy = {}

   heathy_services = Diplomat::Health.state('passing')
   heathy_services.each{ |service| 
     service_data = Diplomat::Service.get(service['CheckID'])
     consul_services_healthy[service['CheckID']] = service_data
   }

what are your thoughts on this?

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

1 participant