Fix: remote kernel stream paths contain too much information
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 8 Aug 2019 19:27:51 +0000 (15:27 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 9 Aug 2019 15:28:43 +0000 (11:28 -0400)
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 <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/kernel-consumer.c

index 236ce0eb6abe2948213e01ec5e2816ba8d62495f..2d0605e9bc1b308a13886cf9f38b9af64b118920 100644 (file)
@@ -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",
This page took 0.025559 seconds and 4 git commands to generate.