Persist Drools working memory to disk when stopping and starting OpenNMS

Description

When restarting OpenNMS, the Drools working memory is lost.
This may include timers and other important facts in the session state.

Please persist and restore working memory during stop/start operations.

It would also be nice to have some kind of periodic persistence so that working memory can be restored after an unexpected stop.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Alejandro Galue April 18, 2017 at 4:37 PM

Alejandro Galue April 17, 2017 at 12:48 PM

Excellent!

I've created . I'll add more details later.

Will Keaney April 17, 2017 at 12:36 PM

Sounds reasonable to me.

Alejandro Galue April 17, 2017 at 11:40 AM

I vote for keeping this issue only for implement the persistence of the state to disk, and create another enhancement issue for dynamically reload the engines when the configuration is changed.

That way, I can create a PR for this one right away.

Alejandro Galue April 13, 2017 at 12:42 PM

I've created a new branch based on foundation-2017 called jira/NMS-9143-foundation-2017. The current changes are based on the original branch jira/NMS-9143 plus some additional changes.

Currently, it can manage the persistence to disk of the state when OpenNMS shutdown, and restore the state when OpenNMS starts, if there are no timer threads involved and persist-state="true" exist on the configuration for the engine in question.

The branch still requires some work prior create a PR.

It seems like implementing the hot-reload of the configuration is not easy based on how the correlator is initialized, and might require hard code changes (i.e. an important refactoring), which is the main reason why I've decided to exclude foundation-2016 from this solution.

I'm still trying to figure out what could be the best way to do this, based on the potential changes a user can made:

  • Update an existing engine (apply changes on a existing directory inside /opt/opennms/etc/drools-endine.d/)

  • Add a new engine (i.e. add new directory on /opt/opennms/etc/drools-endine.d/), which means register a new CorrelationEngine instance.

  • Remove an engine (i.e. delete a directory from /opt/opennms/etc/drools-endine.d/), which means de-register and remove an existing CorrelationEngine instance.

Fixed

Details

Assignee

Reporter

Components

Affects versions

Priority

PagerDuty

Created February 23, 2017 at 11:34 AM
Updated April 25, 2017 at 2:10 AM
Resolved April 24, 2017 at 10:11 PM