From 41d364a8f19aa2b7a9b529fe54c8c75d0a73d38e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lassi=20P=C3=B6l=C3=B6nen?= Date: Thu, 30 Mar 2023 22:02:39 +0300 Subject: [PATCH] Add more detailed logging to compute_ctl's shutdown (#3915) Currently we don't see from the logs, if shutting down tracing takes long time or not. We do see that shutting down computes gets delayed for some reason and hits thhe grace period limit. Moving the shutdown message to slightly later, when we don't have anything else than just exit left. ## Issue ticket number and link ## Checklist before requesting a review - [x] I have performed a self-review of my code. - [ ] If it is a core feature, I have added thorough tests. - [ ] Do we need to implement analytics? if so did you add the relevant metrics to the dashboard? - [ ] If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section. --- compute_tools/src/bin/compute_ctl.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compute_tools/src/bin/compute_ctl.rs b/compute_tools/src/bin/compute_ctl.rs index b96842e416..f29a576413 100644 --- a/compute_tools/src/bin/compute_ctl.rs +++ b/compute_tools/src/bin/compute_ctl.rs @@ -203,13 +203,14 @@ fn main() -> Result<()> { if delay_exit { info!("giving control plane 30s to collect the error before shutdown"); thread::sleep(Duration::from_secs(30)); - info!("shutting down"); } + info!("shutting down tracing"); // Shutdown trace pipeline gracefully, so that it has a chance to send any // pending traces before we exit. tracing_utils::shutdown_tracing(); + info!("shutting down"); exit(exit_code.unwrap_or(1)) }