You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
hasTty is false on /dev/pts/0: bump trace_exec gadget to v0.55.0+ #975
Hi 👋, and thanks for the TTY fields and the very clear docs/features/exec-tty-field.md!
event.hasTty is false for a shell on /dev/pts/0, which is where the first kubectl exec -it into a container lands. node-agent pins ghcr.io/inspektor-gadget/gadget/trace_exec:v0.48.1 (pkg/containerwatcher/v2/tracers/exec.go), which only emits the tty index, so has(event.ttyMajor) is never true and hasTty falls back to an index where 0 means both "no terminal" and /dev/pts/0.
Good news: inspektor-gadget/inspektor-gadget#5714 landed in v0.55.0 and emits the terminal device number. Since node-agent already reads tty_major when it's present, a gadget bump might be all it takes.
kubectl exec -it <pod> -- sh -c 'tty; sleep 3' → prints /dev/pts/0
kubectl exec -it <pod> -- sh -c 'tty; sleep 5' while a pts index is still held → prints /dev/pts/1
Expected behavior
All three rules fire for both shells: each has a terminal (major 136).
Actual Behavior
Terminal
TLX901 control
TLX902 hasTty
TLX903 has(ttyMajor)
tty
/dev/pts/0
fired
not fired
not fired
0
/dev/pts/1
fired
fired
not fired
1
Additional context
This matches the phase-1 expectations in Test_35_ExecTTYFieldTest (c-pts0=0), and v0.3.231 still pins the same gadget. Our use case is a rule reporting interactive shells that stays quiet for containers whose start command is a shell (sh -c ... in CronJobs). For now we keep a per-workload exception list, which we'd happily drop. Happy to help test a bump. Thanks!
changed the title [-]Bump trace_exec gadget to v0.55.0+ so `hasTty` works on `/dev/pts/0`[/-][+]`hasTty` is false on /dev/pts/0: bump trace_exec gadget to v0.55.0+[/+]on Sep 14, 2026
Activity
[-]Bump trace_exec gadget to v0.55.0+ so `hasTty` works on `/dev/pts/0`[/-][+]`hasTty` is false on /dev/pts/0: bump trace_exec gadget to v0.55.0+[/+]matthyx commentedon Nov 6, 2026
Resolved by #1062 (upgraded
trace_execto v0.57.0, which emitstty_majorandtty_minorsoevent.hasTtyandhas(event.ttyMajor)work on/dev/pts/0).