DiskUsageMonitor never fails with a non existing disk

Description

DiskUsageMonitor.poll() never fails a service poll with the "could not find {diskName} in table" status any more.

If we are able to walk hrStorageTableDescr, and get no results, it will return a PollStatus.unavailable();

Then during the iteration through they entryset of results, we flip foundDisk to true, after which since foundDisk is true, we return the status object which was set to PollStatus.available().

So if you had a poll for disk /data, and it wasn't found in the hrStorageDescr columns, it would be marked as available even though it doesn't exist!

DiskUsageMonitor needs a unit test built for it to test all these logic paths.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Jesse White March 26, 2015 at 3:52 PM

Fix reverted, and pull request merged.

Jesse White March 26, 2015 at 3:40 PM

Nice catch. I wasn't aware there was already a pull request for this.

Ronny Trommer March 26, 2015 at 3:36 PM

Does your fix makes this pull request obsolete? https://github.com/OpenNMS/opennms/pull/241

Jesse White March 26, 2015 at 2:53 PM

Fixed in 058aac7060ac7b267007ccd80a637c406d1fa364.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

PagerDuty

Created March 11, 2015 at 6:53 PM
Updated May 11, 2015 at 2:49 PM
Resolved March 26, 2015 at 3:52 PM