Fix: allow quiet rotation at destroy of live session
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 12 Aug 2019 16:16:18 +0000 (12:16 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 21 Aug 2019 19:22:18 +0000 (12:22 -0700)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/cmd.c

index 30f40946df57b118ecf2158c754a80bb1b74dbb1..e8dfbadbf72fbc8a9edee2da53abe0f0f1990c31 100644 (file)
@@ -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;
        }
This page took 0.029484 seconds and 4 git commands to generate.