From: Mathieu Desnoyers Date: Wed, 14 Aug 2019 17:30:28 +0000 (-0400) Subject: Fix: honor base path for network URIs X-Git-Tag: v2.12.0-rc1~478 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=6fa5fe7cc78bea0b0bba154a0f911d3df530e18f;hp=6fa5fe7cc78bea0b0bba154a0f911d3df530e18f Fix: honor base path for network URIs Starting from 2.11, the following use-case stopped working as expected: lttng create --set-url=net://localhost/my/path/custom lttng enable-event -u -a lttng start [ run app ] The output trace is expected in the following directory on the relayd (no timestamp suffix): $LTTNG_HOME/lttng-traces/[hostname]/my/path/custom Add the base_path information to the session object in the session daemon, extracted from the network URI, and pass that information to the relay daemon through the create session (2.11) command. It also fixes the use-case: lttng create --snapshot --set-url=net://localhost/my/path/custom lttng enable-event -u -a lttng start [ run app ] lttng snapshot record which is expected to record the snapshot under: $LTTNG_HOME/lttng-traces/[hostname]/my/path/custom/snapshot-[N]-[timestamp] Similar situation for: lttng create --snapshot lttng enable-event -u -a lttng start [ run app ] lttng snapshot record net://localhost/my/path/custom which is expected to record the snapshot under: $LTTNG_HOME/lttng-traces/[hostname]/my/path/custom/snapshot-[N]-[timestamp] Note that specifying the base_path on the snapshot record command overrides the base path specified at create. Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau ---