Auto-discover is completely broken - Handling newSuspect events throws an exception

Description

Using the latest snapshot of 17, if you add a new node through a newSuspect event, the handler on Provisiond throws a Hibernate/PostgreSQL exception related to the changes added for the monitoring locations.

This will prevent Discoverd to do its job.

Attached is the full stack trace of the exception.

Acceptance / Success Criteria

None

Attachments

2

Lucidchart Diagrams

Activity

Show:

Seth Leger November 24, 2015 at 6:49 PM

I've changed the createLocationIfNecessary() method (which is invoked when adding newSuspect interfaces to a foreign source) so that it populates the monitoringarea field. Marking as fixed.

commit 8a64c6f0166fc1acb873f2828354df95154be15a

Seth Leger November 24, 2015 at 11:41 AM

Thanks for the investigation here. There should be a default value for monitoring-area in the database for the default location and we should use that in the createLocationIfNecessary method.

Alejandro Galue November 24, 2015 at 11:22 AM

I think that the following method should be updated to provide the monitoring-area (because this is now required):

As an experiment, I modified DefaultProvisionService to force the monitoring area to be "local", and the problem is gone. I mean, the handler for new suspect events is working. I'm attaching the changes as a reference.

It seems like we need a reasonable default somewhere (either on the LocationDef class, or the DefaultProvisionService class).

Either way, I think we should modify the interface, because just the location-name is not enough for the new API.

Fixed

Details

Assignee

Reporter

Components

Sprint

Fix versions

Affects versions

Priority

PagerDuty

Created November 6, 2015 at 9:54 AM
Updated November 24, 2015 at 11:45 PM
Resolved November 24, 2015 at 6:49 PM