linkerd-tcp
linkerd-tcp copied to clipboard
`/shutdown` on the admin port no longer results in the process shutting down
$ curl -X POST -vvvv http://127.0.0.1:9989/shutdown
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 9989 (#0)
> POST /shutdown HTTP/1.1
> Host: 127.0.0.1:9989
> User-Agent: curl/7.52.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Length: 0
< Date: Tue, 11 Jul 2017 22:50:51 GMT
<
* Curl_http_done: called premature == 0
* Connection #0 to host 127.0.0.1 left intact
A few minutes later, the process is still running.
I did some digging, and it looks like this is because the admin thread never actually joins – when it receives the /shutdown
endpoint, it sends the shutdown signal on Closer
but then just happily goes back to serving the admin service.
I'm guessing that the correct behavior is either to wait the grace period and then exit, or to wait until all the router threads have joined, and then exit? If the latter, then the admin thread will presumably need some way of knowing if the router threads have joined, which it doesn't currently have...