Fix: allow quiet rotation at destroy of live session
[lttng-tools.git] / 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.027111 seconds and 4 git commands to generate.