Due to the changes introduced with
FLINK-18663 a Flink per-job cluster can no longer properly shut down. The problem is that we no longer serve asynchronous results (e.g. resulting from a cancel-with-savepoint operation) while the cluster waits to shut down.
In order to solve this problem, Flink needs to serve REST request also while it waits for shutting itself down.