feat(hot-reload): reload paths on the fly#128
Merged
Molter73 merged 1 commit intomauro/ROX-30836/hotreload-pathsfrom Oct 23, 2025
Merged
feat(hot-reload): reload paths on the fly#128Molter73 merged 1 commit intomauro/ROX-30836/hotreload-pathsfrom
Molter73 merged 1 commit intomauro/ROX-30836/hotreload-pathsfrom
Conversation
5 tasks
This patch makes it so detaching and reattaching programs is no longer needed for updating the list of monitored paths. This is achieved by first loading all the new paths into the BPF trie map and then removing the entries that are not part of the new configuration. An integration test was added to ensure adding new paths does not remove existing paths accidentally.
f8647ff to
8e12131
Compare
bdbefbc
into
mauro/ROX-30836/hotreload-paths
19 of 20 checks passed
Molter73
added a commit
that referenced
this pull request
Oct 29, 2025
This patch makes it so detaching and reattaching programs is no longer needed for updating the list of monitored paths. This is achieved by first loading all the new paths into the BPF trie map and then removing the entries that are not part of the new configuration. An integration test was added to ensure adding new paths does not remove existing paths accidentally.
Molter73
added a commit
that referenced
this pull request
Oct 30, 2025
This patch makes it so detaching and reattaching programs is no longer needed for updating the list of monitored paths. This is achieved by first loading all the new paths into the BPF trie map and then removing the entries that are not part of the new configuration. An integration test was added to ensure adding new paths does not remove existing paths accidentally.
Molter73
added a commit
that referenced
this pull request
Oct 30, 2025
This patch makes it so detaching and reattaching programs is no longer needed for updating the list of monitored paths. This is achieved by first loading all the new paths into the BPF trie map and then removing the entries that are not part of the new configuration. An integration test was added to ensure adding new paths does not remove existing paths accidentally.
Molter73
added a commit
that referenced
this pull request
Oct 30, 2025
* ROX-30836: implement hotreloading for monitored paths This patch implements hotreloading for the monitored paths. In order to achieve this, the BPF worker will need to detach all LSM hooks before messing with the prefix path map in order to prevent any problems that may arise of events happening in undefined states. This is achieved by keeping a list of links for the programs and dropping them, then re-filling the list once the programs are re-attached. The path prefix map is cleared by keeping a copy of the list of paths that are being monitored, then the new list is added in and a copy of it is stored. * Add test for monitored paths hotreloading * Reduce code duplication on BPF programs handling * Minor cleanup * feat(hot-reload): reload paths on the fly (#128) This patch makes it so detaching and reattaching programs is no longer needed for updating the list of monitored paths. This is achieved by first loading all the new paths into the BPF trie map and then removing the entries that are not part of the new configuration. An integration test was added to ensure adding new paths does not remove existing paths accidentally. * Remove duplicated `RINGBUFFER_NAME` const
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This patch makes it so detaching and reattaching programs is no longer needed for updating the list of monitored paths. This is achieved by first loading all the new paths into the BPF trie map and then removing the entries that are not part of the new configuration.
An integration test was added to ensure adding new paths does not remove existing paths accidentally.
Checklist
Automated testing
If any of these don't apply, please comment below.
Testing Performed
Added an integration test.