Bug #522

default channels should not be created when a channel has been explicitely created

Added by Mathieu Desnoyers about 7 years ago. Updated almost 7 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


As noted in bug , creating a "default" channel if a user forgets to put "-c channel_name" in the following add-context, enable-event, etc commands is misleading. The natural expected behavior would be that the command would apply the the last enabled channel (notion of a "current" channel, like we have for sessions), but certainly not that it creates a new channel with default attributes behind the user's back.

An intermediate fix that would not require to keep a notion of current channel could be to refuse creation of a default channel if at least one non-default channel has already been created in the session.

Since this is an issue of UI correctness (it's hiding a side-effect from the user), I think it should be treated as a bug.

Thoughts ?




Updated by Daniel U. Thibault about 7 years ago

I would vote to make the -c option mandatory, the command being rejected with a clear error message. Having a "current channel" would not only be complicated (lttng-sessiond would need to keep each session's current channel in memory, so that when a user switches from one session to another the new session's current channel is recovered, plus the session-setting user feedback message would need to remind the user of the current channel for that session), it would lead to user mistakes (unintended effects) when re-ordering or copy-and-pasting lttng script lines.


Updated by David Goulet almost 7 years ago

  • Status changed from New to Confirmed
  • Target version set to 2.3

Updated by Mathieu Desnoyers almost 7 years ago

  • Status changed from Confirmed to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF