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

plugin_init is called when creating a disabled north/south service #1407

Open
FlorentP42 opened this issue Jul 1, 2024 · 0 comments
Open
Assignees

Comments

@FlorentP42
Copy link
Contributor

FlorentP42 commented Jul 1, 2024

Describe the bug
When creating a north/south service, you can select if the plugin behind that service will be enabled by default or not from the GUI (or from the API).
If you create a service disabled at creation, then plugin_init is called for that plugin.
And even more strange the plugin initialized this way then seems to "disappear" without even a call to plugin_shutdown, which may result in memory leaks.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new fledge-south-hnz service from Fledge GUI with log level set to "debug" at startup (through START_LOG_LEVEL).
  2. Uncheck the "Enable" box in the last menu of service creation.
  3. Notice in the logs that plugin_init is called (that should not happen).
  4. Enable the plugin in the options.
  5. Notice in the logs that plugin_init is called again (as expected).
  6. Notice in the logs that plugin_shutdown was not called on that plugin between the two plugin_init (does not feel like the intended behavior).

Expected behavior
If we make the service disabled at creation, we expect the service configuration to be saved for when it will be enabled later, but no plugin to be initialized at all.

Additional context

  • Fledge Version: 2.4.0
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

No branches or pull requests

2 participants