This issue created from report in support ticket https://mynms.opennms.com/Ticket/Display.html?id=3239
Steps to reproduce:
1. Create a requisition called "test". Create a node in that requisition called "test-sw-1". Add an interface to this node whose IP address is not reachable with snmp-primary=N. Add the ICMP service to that interface. Save the requisition.
2. Edit the foreign-source definition for "test". Add a policy called "Categorize", class "Set Node Category", key "category" => value "Switches". Match behavior = ALL_PARAMETERS. Add parameter key "label" => value "~.sw.".
3. Synchronize the "test" requisition. Wait for the test-sw-1 node to be created, populated, and to go into a nodeDown outage. Wait another moment for good measure.
4. Synchronize the "test" requisition again.
Expected result: nothing but maybe a nodeUpdated event on the test-sw-1 node
Actual result: new nodeDown outage created for the test-sw-1 node, and the previous outage was closed with no nodeUp event.
If I add a second node whose node label does not match the regex in the category-setting policy, that node's outages do not get summarily closed and re-created.