-
Notifications
You must be signed in to change notification settings - Fork 360
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
sensors: modify unload hooks and remove GetConfig and SetConfig #1385
Commits on Aug 24, 2023
-
pkg/sensors: rename UnloadHook to PreUnloadHook
UnloadHook is called before the programs and maps are being removed. In preparation to the addition of a PostUnloadHook, we rename the hook to PreUnloadHook to be more explicit. Signed-off-by: Mahe Tardy <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1b54a0e - Browse repository at this point
Copy the full SHA 1b54a0eView commit details -
pkg/sensors: add a new PostUnloadHook hook to sensors
This hook is a complement to PreUnloadHook freshly renamed in previous commit. It is intended to replace Ops.Unloaded to be called at the sensor level and not the collection level. Signed-off-by: Mahe Tardy <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d5cacd6 - Browse repository at this point
Copy the full SHA d5cacd6View commit details -
pkg/sensors: remove Ops.Unloaded
This operation was replaced with previous commit's PostUnloadHook and is now directly called from *Sensor.Unload instead of collection caller. Signed-off-by: Mahe Tardy <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7b38657 - Browse repository at this point
Copy the full SHA 7b38657View commit details -
sensors: remove GetConfig and SetConfig
This removes the Ops Operations field on the Sensor struct since it's no longer needed. It removes the Loaded hook that was called at a collection of sensor loading time. We can add LoadHook (similarly as Pre and Post UnloadHook) in the future if it's needed again. It removes GetConfig and SetConfig along and removes those functions from the API since they were already not used, see this note: > NB: sensorConfigSet was used before tracing policies were > introduced. The idea was that it could be used to provide > sensor-specifc configuration values. We can either modify the > call to specify a sensor within a collection, or completely > remove it. TBD. Signed-off-by: Mahe Tardy <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 321be09 - Browse repository at this point
Copy the full SHA 321be09View commit details -
pkg/sensors: cleanup kprobe entry from table on unload
Previously, we kept all the unloaded kprobe entries in the generic kprobe table forever, never calling RemoveEntry. This patch uses PostUnloadHook to cleanup the entry from the table at unload time, other cleanups could be performed there if needed. Signed-off-by: Mahe Tardy <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 310846e - Browse repository at this point
Copy the full SHA 310846eView commit details -
pkg/sensors: test that table cleanup is done on sensor unload
Signed-off-by: Mahe Tardy <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b19964a - Browse repository at this point
Copy the full SHA b19964aView commit details -
pkg/sensors: use proper structured logging in *Sensor.Unload
Signed-off-by: Mahe Tardy <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2b74b4b - Browse repository at this point
Copy the full SHA 2b74b4bView commit details