Fix: unprivilieged sessiond agent port clashes with root sessiond
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 24 Apr 2018 19:58:41 +0000 (15:58 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 25 Apr 2018 15:11:00 +0000 (11:11 -0400)
This fix addresses the same problem as reported in f28f9e44.

The session daemon now tries to bind the agent TCP socket to a
port within a range (10 ports by default). The session daemon
will use the first available TCP port within that range when
binding to "localhost". It is still possible to restrict the
session daemon to the broken behaviour by specifying an agent
port using the --agent-tcp-port PORT. If that option is used,
the session daemon will attempt to bind to that part. If it
fails, agent tracing will be marked as disabled.

This fix is backported since the current logic of binding to a
set port means that the default configuration on Ubuntu, Debian,
and other distributions that launch an lttng-sessiond on boot does
not allow the tracing of agent domains (Java Util Logging, log4j,
and Python logging back-ends).

By default, users are not part of the tracing group and it is
not reasonable to expect users to be part of that group for
userspace tracing.

The behaviour of the "system" lttng-sessiond does not change
as it will bind on the first available port within the range.
The non-privilieged session daemons that will be launched after
will be able to bind on other ports available within the range.

Reported-by: Deborah Barnard <starfallprojects@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>

No differences found
This page took 0.024624 seconds and 4 git commands to generate.