tetragon icon indicating copy to clipboard operation
tetragon copied to clipboard

Fix: monitoring BPF maps

Open sadath-12 opened this issue 1 year ago • 18 comments

This pr Closes #1774 considering all its points and 1st part of https://github.com/cilium/tetragon/issues/1775

Let's break down the changes applied considering #1774 point wise

    • seems to be solved by removing eventcache as it was supposed to be on user side and the user side EventCacheCount seems sufficient
    • _gauge suffix removed
    • processLru migrated towards ProcessCacheTotal as separate metric and eventcache removed as said in 1)
    • map_errors_total text rewritted
    • map_drops_total removed and in its place ProcessCacheEvicted used

sadath-12 avatar Jan 09 '24 12:01 sadath-12

WIP !

sadath-12 avatar Jan 09 '24 12:01 sadath-12

Moved to draft since it seems to be WIP.

kkourt avatar Jan 09 '24 12:01 kkourt

Moved to draft since it seems to be WIP.

yes thank you @kkourt

sadath-12 avatar Jan 09 '24 12:01 sadath-12

ready to review

sadath-12 avatar Jan 09 '24 13:01 sadath-12

@sadath-12 I see your PR has conflicts with the main branch, can you rebase?

lambdanis avatar Jan 10 '24 12:01 lambdanis

Done @lambdanis

sadath-12 avatar Jan 11 '24 14:01 sadath-12

@sadath-12 It seems commits are still a bit off. You can check this in the checkpath action run (here).

There should be no merge commits, and ideally different tasks you implemented in this PR should be separate commits - they're quite independent of each other, so separate commits would make it easier to review the git history. I think it would be good to rewrite the git history here:

git reset HEAD~2
git add -p
# add only changes for a single task
git commit
# repeat git add, git commit for other tasks

lambdanis avatar Jan 12 '24 13:01 lambdanis

Deploy Preview for tetragon ready!

Name Link
Latest commit 5305df283cdac9e3ccf348306942ef3de33b4741
Latest deploy log https://app.netlify.com/sites/tetragon/deploys/65e161822f87730008423a67
Deploy Preview https://deploy-preview-1950--tetragon.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Jan 15 '24 18:01 netlify[bot]

Please fix the merge commit to have a proper description. Also <[email protected]> seems to be messing up our signed-off-by detection. Could you replace it with your email like you did for the other commit?

willfindlay avatar Jan 22 '24 14:01 willfindlay

Needs formatting with goimports.

willfindlay avatar Jan 22 '24 14:01 willfindlay

@sadath-12 Could you split the changes into logical commits? As there are five different fixes, it would make sense to have five separate commits for them in this case.

lambdanis avatar Jan 30 '24 10:01 lambdanis

Hi @lambdanis . If there are 5 commits and let's say there was a review on the 3rd commit and pushed the new changes by squashing would it reflect on the 3rd commit ? . Requesting you to accept this in 1 commit itself as they are very small changes and I have given explanation on description

sadath-12 avatar Feb 02 '24 09:02 sadath-12

Requesting you to accept this in 1 commit itself as they are very small changes and I have given explanation on description

Could you reflect this description in the commit message body? It's empty at the moment.

willfindlay avatar Feb 09 '24 14:02 willfindlay

@sadath-12 also it should be relatively easy to split this into separate commits. Here's how you can do it:

  1. Make a backup copy of your branch with git branch -c backup
  2. git reset --soft HEAD~1 to remove the existing commit but keep the changes.
  3. git add -p
  4. Select the changes you want to include in commit 1 following the instructions on the screen.
  5. When you're done, write the commit message.
  6. Repeat step 2-4 until there are no changes left.
  7. When you're happy with it, force push.

willfindlay avatar Feb 09 '24 15:02 willfindlay

Ya I can separate the commits like 1,2,3,4 . if after review I get changed related to 2nd commit how I make a new change and squash it under 2 ?

sadath-12 avatar Feb 10 '24 13:02 sadath-12

Ya I can separate the commits like 1,2,3,4 . if after review I get changed related to 2nd commit how I make a new change and squash it under 2 ?

@sadath-12 Create a temporary commit, then use git rebase -i HEAD~4 (interactive mode which allows you to rewrite the git history - reorder, squash, amend previous commits).

lambdanis avatar Feb 12 '24 18:02 lambdanis

@sadath-12 I see the CI is failing because of a commit message being too long: https://github.com/cilium/tetragon/actions/runs/8004683889/job/21862554217?pr=1950

Could you rephrase it to fit the characters limit?

lambdanis avatar Feb 23 '24 13:02 lambdanis

@sadath-12 I see the CI is failing because of a commit message being too long: https://github.com/cilium/tetragon/actions/runs/8004683889/job/21862554217?pr=1950

Could you rephrase it to fit the characters limit?

ya reworded that . Tried to explain in description without making much sense (but enough) in the title of commit msg

sadath-12 avatar Feb 23 '24 16:02 sadath-12

@lambdanis @willfindlay could you take a look and merge if its ready to go? Thanks. CI failure there is something unrelated, I see this failure from time to time.

jrfastab avatar Feb 29 '24 06:02 jrfastab

Thanks @sadath-12 for the updates. The code changes look good now. I rewrote the commit messages to describe exactly which metrics changed and split some commits to not mix up different changes. I dropped the _gauge suffix removal, as it's a breaking change that's hard to justify as a bug, so it shouldn't be mixed up in one PR with unrelated changes IMO. I also rewrote the PR description to include a release note.

lambdanis avatar Mar 01 '24 12:03 lambdanis

The CI failure is a known issue: https://github.com/cilium/tetragon/issues/2010. I'm merging this PR.

lambdanis avatar Mar 01 '24 12:03 lambdanis