consul icon indicating copy to clipboard operation
consul copied to clipboard

[idea/question] treat failed consul server nodes as a more severe failure (don't remove from catalog automatically?)

Open wuub opened this issue 12 years ago • 5 comments

Short story: I stopped (forcefully) one of our 5 consul server VMs and migrated it to a different host node, with 4 remaining servers everything was working fine (obviously :))

What I forgot to do, was start the migrated VM afterwards [duh].

AFAICT after some time consul (0.3.0) removed the failed consul server service/node from the catalog, I don't know if raft peer set was shrunk at the same time, what I do know is that everything looked green and A-Ok in Consul UI.

On the one hand this automatic reap is documented, consistent and helpful behaviour, on the other it feels somewhat dangerous when consul servers are involved.

Maybe failed consul server nodes should be left in the catalog until someone force-leave them? Or maybe we should just monitor our consul's peer set more closely?

What do you think?

wuub avatar Jul 15 '14 14:07 wuub

Yeah, this is worth thinking about. I struggled with this myself. I agree that servers do feel special and maybe should not auto-reap. Or maybe they do auto-reap Catalog entries, but are not removed from the Raft peer set automatically. I'm not sure what is the best approach.

armon avatar Jul 15 '14 17:07 armon

Could this be a configuration option? server-auto-reap-time or such? (What is that value now?) Set to zero to never reap servers?

carlivar avatar Jul 28 '14 06:07 carlivar

@carlivar It could be! Current it is 72 hours to reap any node (client or server).

armon avatar Jul 29 '14 01:07 armon

:+1 for configuration option

hoffoo avatar Feb 19 '15 22:02 hoffoo

In Consul 0.8 we introduced https://www.consul.io/docs/guides/autopilot.html#dead-server-cleanup which tries to balance things by making it as safe as possible by keeping a failed server in for the 72 hours but kicking it immediately if a new replacement server is introduced.

slackpad avatar Apr 12 '17 08:04 slackpad