From 808e23bbd40c4f4e6a36ee3eb6ccb05001bc8f46 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Tue, 10 Dec 2013 14:42:29 -0800 Subject: [PATCH] consul: Adding method to force remove failed nodes --- consul/server.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/consul/server.go b/consul/server.go index cfa9687992..7cffb105ea 100644 --- a/consul/server.go +++ b/consul/server.go @@ -337,3 +337,14 @@ func (s *Server) LANMembers() []serf.Member { func (s *Server) WANMembers() []serf.Member { return s.serfWAN.Members() } + +// RemoveFailedNode is used to remove a failed node from the cluster +func (s *Server) RemoveFailedNode(node string) error { + if err := s.serfLAN.RemoveFailedNode(node); err != nil { + return err + } + if err := s.serfWAN.RemoveFailedNode(node); err != nil { + return err + } + return nil +}