[idea/question] treat failed consul server nodes as a more severe failure (don't remove from catalog automatically?)
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?
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.
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 It could be! Current it is 72 hours to reap any node (client or server).
:+1 for configuration option
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.