Skip to content

Commit

Permalink
cmd/contour: forcibly terminate the xDS server on shutdown
Browse files Browse the repository at this point in the history
Fix a regression from projectcontour#2780, where the Contour xDS server would fail
to stop because it is waiting for xDS connections to drain (they won't
drain).

This updates projectcontour#2780.

Signed-off-by: James Peach <jpeach@vmware.com>
  • Loading branch information
jpeach committed Aug 17, 2020
1 parent 06e8d98 commit 73cbf17
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/contour/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,12 @@ func doServe(log logrus.FieldLogger, ctx *serveContext) error {

go func() {
<-stop
rpcServer.GracefulStop()

// We don't use GracefulStop here because envoy
// has long-lived hanging xDS requests. There's no
// mechanism to make those pending requests fail,
// so we forcibly terminate the TCP sessions.
rpcServer.Stop()
}()

return rpcServer.Serve(l)
Expand Down

0 comments on commit 73cbf17

Please sign in to comment.