From 7e0de2192e89732f6dea0b72992096a028ca02d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 1 Apr 2020 22:16:32 -0400 Subject: [PATCH] Fix: sessiond: erroneous error code returned on rotation failure MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit `LTTNG_ERR_KERN_CONSUMER_FAIL` is returned by the kernel domain rotation handling code. This code is associated with a failure to launch the kernel consumer daemon which is not the case here. The `LTTNG_ERR_ROTATION_FAIL_CONSUMER` is used instead and returned to the client. Signed-off-by: Jérémie Galarneau Change-Id: Ifdc9e46addcc4dc7ca2002d6dff5b2d7ac6c31f3 --- src/bin/lttng-sessiond/kernel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/lttng-sessiond/kernel.c b/src/bin/lttng-sessiond/kernel.c index 547d2ec6c..53efad5e7 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -1741,7 +1741,7 @@ enum lttng_error_code kernel_rotate_session(struct ltt_session *session) ksess->uid, ksess->gid, ksess->consumer, /* is_metadata_channel */ false); if (ret < 0) { - status = LTTNG_ERR_KERN_CONSUMER_FAIL; + status = LTTNG_ERR_ROTATION_FAIL_CONSUMER; goto error; } } @@ -1753,7 +1753,7 @@ enum lttng_error_code kernel_rotate_session(struct ltt_session *session) ksess->uid, ksess->gid, ksess->consumer, /* is_metadata_channel */ true); if (ret < 0) { - status = LTTNG_ERR_KERN_CONSUMER_FAIL; + status = LTTNG_ERR_ROTATION_FAIL_CONSUMER; goto error; } } -- 2.34.1