mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-28 12:17:02 +00:00
If server shutdown hangs, the `manager.server_stop_gracefully` call would eventually (after 5 minutes) timeout with a cryptic `TimeoutError`; it's a generic timeout for performing requests by the tests to `ScyllaClusterManager`. It was non-obvious how to find what actually caused the timeout - you'd have to browse multiple logs. Introduce an explicit timeout in `ScyllaServer.stop_gracefully`. Set it to 1 minute. Whether this is a good value may be arguable, but shutdown taking longer than that probably indicates problems. The important thing is that this timeout is shorter than the generic request timeout. If this times out we get a nice error in the test: ``` E test.pylib.rest_client.HTTPError: HTTP error 500, uri: http+unix://api/cluster/server/1/stop_gracefully, params: None, json: None, body: E Stopping server ScyllaServer(1, 127.162.40.1, 826d5884-4696-4a22-80a7-cc872aa43102) gracefully took longer than 60s ```