From: Mathieu Desnoyers Date: Mon, 12 Aug 2019 16:16:18 +0000 (-0400) Subject: Fix: allow quiet rotation at destroy of live session X-Git-Tag: v2.12.0-rc1~502 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=d48d65e152d4a6218f6b3415486f502169bf1949 Fix: allow quiet rotation at destroy of live session Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- 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; }