Project

General

Profile

Actions

Feature #705

closed

Resolve .lttngrc contention issues

Added by Daniel U. Thibault about 11 years ago. Updated over 10 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
Target version:
Start date:
12/12/2013
Due date:
% Done:

0%

Estimated time:

Description

The .lttngrc file should be put with the other LTTng transient files like lttng-sessiond.pid. That is to say, in /run/lttng for a root session daemon or in $HOME/.lttng for a user-space daemon. Doing so would avoid any .lttngrc contention grief (such as when a non-tracing group user alternates between sudo lttng and lttng commands).

The simplest way to do this is very likely to have the client obtain the .lttngrc path from whichever session daemon it reaches (or spawns).

The behaviour would be:
  • If the lttng client is elevated (through an su shell or a sudo call), use /run/lttng/.lttngrc
  • Else,
    • If the user is a member of the tracing group and there is no local session daemon, use /run/lttng/.lttngrc
    • Else use $HOME/.lttng/.lttngrc

I say 'If the user is a member of the tracing group and there is no local session daemon' because that is the current behaviour. For a tracing group member, if there is no session daemon, the root daemon is spawned and becomes the client's interlocutor. If the root daemon is running and there is no local session daemon, the lttng client again talks to the root daemon. But if there is a local session daemon (alone or in combination with a root daemon), it intercepts the (unelevated) lttng client commands.

Actions

Also available in: Atom PDF