From a5ba6fdde6d199e37ac6354d296dfacb81428d0e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 8 Aug 2019 15:27:51 -0400 Subject: [PATCH] Fix: remote kernel stream paths contain too much information MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The kernel stream paths, when built with a "net" consumer type, contain the hostname and session name. This is redundant and must not be transmitted to 2.11+ relay daemons. Otherwise, this results in an erronerous path hierarchy on the remote end. Stream paths transmitted to a trace chunk-aware peer are relative to a session's output trace chunk. Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/kernel-consumer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/kernel-consumer.c b/src/bin/lttng-sessiond/kernel-consumer.c index 236ce0eb6..2d0605e9b 100644 --- a/src/bin/lttng-sessiond/kernel-consumer.c +++ b/src/bin/lttng-sessiond/kernel-consumer.c @@ -42,7 +42,10 @@ static char *create_channel_path(struct consumer_output *consumer) assert(consumer); /* Get the right path name destination */ - if (consumer->type == CONSUMER_DST_LOCAL) { + if (consumer->type == CONSUMER_DST_LOCAL || + (consumer->type == CONSUMER_DST_NET && + consumer->relay_major_version == 2 && + consumer->relay_minor_version >= 11)) { pathname = strdup(consumer->domain_subdir); if (!pathname) { PERROR("Failed to copy domain subdirectory string %s", -- 2.34.1