NMS-16518: Fix scriptd's broken reloadDaemonConfig handling #7427
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.
Since NMS-13216, the logic to handle
reloadDaemonConfig
events in Scriptd has been broken. In attempting to fix it, I also realized that Scriptd's previous behavior was also broken in that it would not refresh scripts referenced in the config that had been modified onreloadDaemonConfig
. Restore the previous handling of thereloadDaemonConfig
event, and change Scriptd destroy and re-register the defined BSF engines entirely, which causes Scriptd to re-read and re-source all referenced scripts.All Contributors
Contribution Checklist
Once there is an issue, please:
${JIRA-ISSUE-NUMBER}: subject of pull request
Don't worry if this sounds like a lot, we can help you get things set up properly.
-smoke
in it to trigger smoke tests?foundation-*
branch, does it try to avoid changing files in$OPENNMS_HOME/etc/
?What's Next?
A PR should be assigned at least 2 reviewers. If you know that someone would be a good person to review your code, feel free to add them.
If you need help making additions or changes to the documentation related to your changes, please let us know.
In any case, if anything is unclear or you want help getting your PR ready for merge, please don't hesitate to say something in the comments here,
or in the #opennms-development chat channel.
Once reviewer(s) accept the PR and the branch passes continuous integration, the PR is eligible for merge.
At that time, if you have commit access (are an OpenNMS Group employee or a member of the OGP) you are welcome to merge the PR when you're ready.
Otherwise, a reviewer can merge it for you.
Thanks for taking time to contribute!
External References