From d48d65e152d4a6218f6b3415486f502169bf1949 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 12 Aug 2019 12:16:18 -0400 Subject: [PATCH] Fix: allow quiet rotation at destroy of live session MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/cmd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 30f40946d..e8dfbadbf 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -4746,7 +4746,14 @@ int cmd_rotate_session(struct ltt_session *session, goto end; } - if (session->live_timer || !session->output_traces) { + /* + * Explicit rotation is not supported for live sessions. + * However, live sessions can perform a quiet rotation on + * destroy. + * Rotation is not supported for snapshot traces (no output). + */ + if ((!quiet_rotation && session->live_timer) || + !session->output_traces) { cmd_ret = LTTNG_ERR_ROTATION_NOT_AVAILABLE; goto end; } -- 2.34.1