Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

btf: improve logging around BTF files lookup #314

Merged
merged 6 commits into from
Aug 16, 2022

Conversation

tixxdz
Copy link
Member

@tixxdz tixxdz commented Aug 11, 2022

Users and even developers may get confused on why Tetragon is not working or did it find the appropriate BTF files. Improve logging and reduce confusion

Signed-off-by: Djalal Harouni tixxdz@gmail.com

@tixxdz tixxdz requested a review from a team as a code owner August 11, 2022 17:08
@tixxdz tixxdz requested a review from kaworu August 11, 2022 17:08
@tixxdz tixxdz force-pushed the pr/tixxdz/log-btf-metadata branch 3 times, most recently from 9411695 to 7a26e68 Compare August 15, 2022 12:05
Copy link
Contributor

@olsajiri olsajiri left a comment

Choose a reason for hiding this comment

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

looks good

Tetragon needs btf to work so let's be explicit if it did find
or not btf files, less confusion to users and developers.

Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
Improve logging message so it shows the real location of BTF file
that is being used.

Using Config.BTF is not sufficient as it can be empty not set, where
Tetragon auto discovered the real location of the BTF file, so use
that instead.

Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
We have already looked up the btf file and it is saved inside
btfFile of the btf package, so just ignore this argument which is
bogus anyway as it can be nil.

Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
@tixxdz
Copy link
Member Author

tixxdz commented Aug 15, 2022

thanks @olsajiri ! fixed tests as it seems btf file is under /boot/ and we have some env sets, all pass now.

@jrfastab jrfastab merged commit 330fbbd into main Aug 16, 2022
@jrfastab jrfastab deleted the pr/tixxdz/log-btf-metadata branch August 16, 2022 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants