Threshold state keys do not incorporate the collected resource's instance label

Description

The key used to persist threshold states does not currently take into account the collected resource's instance label. This leads to key collisions for states where multiple thresholding evaluation states refer to the same persisted state.

During steady state operation this shouldn't manifest as an issue since the in-memory copy will be used. However upon restart we load state from the persistence store and multiple thresholds will obtain the state that resulted from the collisions which will cause unexpected thresholding behaviour.

Acceptance / Success Criteria

None

Attachments

2

Lucidchart Diagrams

Activity

Show:

Matthew Brooks October 9, 2019 at 2:42 PM

awesome, thanks a lot for testing it!

Dino Yancey October 9, 2019 at 2:32 PM

@mbrooks This appears to have fixed the issue.  Thanks a bunch!

Matthew Brooks October 8, 2019 at 8:10 PM
Edited

to test this fix perform the following:

  1. Copy the two attached jars to the /lib directory for OpenNMS.

  2. Restart OpenNMS

  3. Clear all the existing thresholding states with the following Karaf shell command (the next time you restart all the threshold states will be lost)

  1. Restart OpenNMS again

 

At this point, new threshold states that get persisted should use the correct keys and no longer collide. You could then try to reproduce the previous behaviour you saw and if the updated jars work you should no longer see that problem.

Matthew Brooks October 8, 2019 at 7:52 PM

Matthew Brooks October 7, 2019 at 7:59 PM

This issue was seen in the field by a user, link to chat here: https://chat.opennms.com/opennms/pl/kq8cbjjfnjbap8er45rakxjxqy

Fixed

Details

Assignee

Reporter

Sprint

Priority

PagerDuty

Created October 7, 2019 at 7:57 PM
Updated October 11, 2019 at 6:04 PM
Resolved October 11, 2019 at 6:04 PM