Fix: Subdirectory handling for lttng and sessiond
The subdirectory creation was not right for a number of scenarios. With
this commit, if the user defines a path (either local or remote), the
session name will NOT be added to the path.
To handle the timestamp creation of the directory, a hidden function was
added to the lttng-ctl (meaning not visible through lttng.h) which takes
the date and time as a string and append it to the URI subdirectory if
none was provided for a network destination. This function is declared
as extern in the lttng client so it could link to it through the
liblttng-ctl (_lttng_create_session_ext).
It allows the timestamp of a session to be created on the client side
and keep the lttng_create_session() behavior intact meaning if a path is
define by the user when using the API directly, the traces are written
in that path without an extra session name directory.
There is one case where the timestamp is generated on the daemon side.
When creating a session with a local filesystem destination and then
switching to a network consumer, at that time the timestamp is
generated.
The real problematic, and why this has been done this way, is because we
can't transfer the timestamp between the client and the session daemon.
The only possible way that could be achieve right now is by parsing the
subdirectory of the URI containing the session name and timestamp
appended. This could be error prone and bring false negative.
CC: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
This page took 0.027074 seconds and 4 git commands to generate.