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

add maintenance mode option to init scripts #124

Closed
benschw opened this issue May 22, 2015 · 6 comments
Closed

add maintenance mode option to init scripts #124

benschw opened this issue May 22, 2015 · 6 comments

Comments

@benschw
Copy link
Contributor

benschw commented May 22, 2015

In order to not have critical health checks (and the duration of the ttl as a window when a stopped service is still showing up available) would it make sense to integrate calls to consul maint -enable and consul main -disable in the init script start and stop calls?

https://consul.io/docs/commands/maint.html

This command can be made to take either an entire consul agent, or just a single service into and out of maintenance mode: where it continues to show up in the consul cluster but isn't made available to the discovery services.

@solarkennedy
Copy link
Contributor

Yea, I think that would add a nice bit of polish.

On upstart this would be done as a pre-stop and post-start thing?

Do you think this meshes with most user's expectations? (stopping consul maints services on that node)

@benschw
Copy link
Contributor Author

benschw commented May 28, 2015

yeah, I'm not sure that it is.

It would be nice to control this within puppet, but I think it's more closely related to the services being registered. (I might end up including this in either my application being registered's init script, or else in the rundeck script used to deploy the app)

sorry for being so indecisive :)

@solarkennedy
Copy link
Contributor

I would like to see a second opinion. Also remember that I don't use this module in "production", so you may be seeing real issues earlier than I am.

@eliranbz
Copy link
Contributor

I agree, can be very useful - I'd love to have this feature in production,
Also, if the Consul agent is stopped - Obviously it should be on discovery service.
If it crashed, it won't be in maintenance mode.
Can be defined by a params to enable or disable this

@aj-jester
Copy link

There might be some problems doing it this way. What happens when a node "gracefully" shuts down and leaves the cluster for good?

According to the docs when a node returns from maintenance it only get back in the "queries" (DNS and API). So I'm thinking while in maintenance the cluster still expects to communicate with the agent. If you put the node in maintenance and stop the daemon I bet it will show up as failed.

Besides I think these fixes #87 #146 (original issue #85) negates this; leave is a better solution here.

So we can close this?

@hopperd
Copy link
Contributor

hopperd commented Mar 25, 2016

Closing since this is an old issue and @aj-jester stated this should be resolved by the above issues.

@hopperd hopperd closed this as completed Mar 25, 2016
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

5 participants