Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

tetragon: Move procevents.GetRunningProcs call from base sensor load #3097

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

olsajiri
Copy link
Contributor

@olsajiri olsajiri commented Nov 8, 2024

We need to call procevents.GetRunningProcs after server is started observer listeners are configured.

Currently it's called within base sensor load, but it's now loaded before server is started, so we don't get any initial exec events.

@olsajiri olsajiri added the release-note/minor This PR introduces a minor user-visible change label Nov 8, 2024
@olsajiri olsajiri force-pushed the pr/olsajiri/getprocs branch 4 times, most recently from 24984fc to 3f0107e Compare November 10, 2024 16:30
We need to call procevents.GetRunningProcs after server is started
observer listeners are configured.

Currently it's called within base sensor load, but it's now loaded
before server is started, so we don't get any initial exec events.

Fixes: a5d7f0e ("tetragon: Load initial sensor via sensor manager")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
@olsajiri olsajiri force-pushed the pr/olsajiri/getprocs branch from 3f0107e to 3d3213b Compare November 10, 2024 20:44
Execute tetragon through main and make sure we get exec events
generated.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
@olsajiri olsajiri force-pushed the pr/olsajiri/getprocs branch from 3d3213b to 75167f5 Compare November 10, 2024 21:48
@olsajiri olsajiri marked this pull request as ready for review November 11, 2024 06:51
@olsajiri olsajiri requested a review from a team as a code owner November 11, 2024 06:51
tus.LoadSensor(t, base.GetInitialSensor())
tus.LoadInitialSensor(t)

if err := procevents.GetRunningProcs(); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need that here? It seems that tus.LoadInitialSensor(t) also calls procevents.GetRunningProcs().

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh, leftover, will remove, thanks

Copy link
Member

@tpapagian tpapagian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than a small comment, this LGTM!

Copy link
Contributor

@kkourt kkourt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@olsajiri olsajiri merged commit f4c46dd into main Nov 11, 2024
40 checks passed
@olsajiri olsajiri deleted the pr/olsajiri/getprocs branch November 11, 2024 11:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
release-note/minor This PR introduces a minor user-visible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants