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

[module-manager] Disable modules hooks correctly #513

Merged
merged 4 commits into from
Oct 14, 2024

Conversation

miklezzzz
Copy link
Contributor

@miklezzzz miklezzzz commented Oct 14, 2024

Overview

Updates a hook storage's clean method to reset the controllersReady flag to false every time the module is disabled.

Also, contains a small fix to the scheduler's method.

What this PR does / why we need it

Without resetting the controllersReady flag when a module is disabled, there is a possibility to catch a panic next time the module is enabled, as the module's hooks have to get their hooks controllers set before they can be safely evoked. The controllersReady helps avoid evoking a hook which hook controller hasn't been set yet.

Special notes for your reviewer

Signed-off-by: Mikhail Scherba <mikhail.scherba@flant.com>
Signed-off-by: Mikhail Scherba <mikhail.scherba@flant.com>
Signed-off-by: Mikhail Scherba <mikhail.scherba@flant.com>
@miklezzzz miklezzzz added the bug Something isn't working label Oct 14, 2024
@miklezzzz miklezzzz self-assigned this Oct 14, 2024
@miklezzzz miklezzzz marked this pull request as ready for review October 14, 2024 16:54
Signed-off-by: Mikhail Scherba <mikhail.scherba@flant.com>
@yalosev yalosev merged commit b94b574 into main Oct 14, 2024
7 checks passed
@yalosev yalosev deleted the disable-modules-hooks-correctly branch October 14, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants