Resolve "Plugin is created and persisted in the database even if the creation of a network element failed"
This MR handles the clean up of a started plugin if the network element creation failed.
Description
Currently we start and persist a plugin for each network element that is created. Therefore it is needed that the plugin is shut down and the corresponding files are removed if an error is thrown while a new network element is created.
For any instance in which an error could occur (if a network element is created), it is now ensured that the corresponding plugin (if already requested and started) is shut down and proberly removed.
Related Issue
Motivation and Context
There shouldn't be any idling plugins that are never used. But this was the case as soon as the creation of a network element fails.
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
-
My code follows the code style of this project. -
My change requires a change to the documentation. -
I have updated the documentation accordingly. -
I have read the CONTRIBUTING document. -
I have added tests to cover my changes. -
All new and existing tests passed.
Merge request reports
Activity
- A deleted user
added componentnucleus goSDN typebug labels
added 1 commit
- 0fe7cebc - Move the add to storage call for a plugin from RequestPlugin to addMne
added 19 commits
-
0bd1ed2e...17211eb2 - 16 commits from branch
master
- 87808c33 - Move the add to storage call for a plugin from RequestPlugin to addMne
- 28c06bf6 - Add remove method to plugin
- 3535d8ff - Remove unnecessary args in plugin cmd
Toggle commit list-
0bd1ed2e...17211eb2 - 16 commits from branch
added 2 commits
requested review from @hda11249 and @neil.schark
added 9 commits
-
28d2c556...d1ca2583 - 4 commits from branch
master
- ad8ad4a4 - Move the add to storage call for a plugin from RequestPlugin to addMne
- 9cf76a96 - Add remove method to plugin
- c3bb6578 - Remove unnecessary args in plugin cmd
- caeae902 - Update plugin mock
- 9f0170c4 - Catch missing errors thrown by plugin.Remove
Toggle commit list-
28d2c556...d1ca2583 - 4 commits from branch
enabled an automatic merge when the pipeline for 9f0170c4 succeeds
- A deleted user
merged
mentioned in commit 5011a5ff