Requesting IPv6 resources on measurements rest endpoint fails

Description

When trying to access the measurement rest endpoint at a similar URL to the following:

The endpoint responds with:

'Fetch failed'

on further digging, this seems to be an issue with colons being in the filename - when storing rrd files by IP address, with IPv6 addresses. The command which gets run underneath for the address above is:

What this command needs to be is the following (atleast for it to work on the command line):

The difference is the double escaping of the colons. In the manpage for RRDtool, specifically 'rrdgraph_data' it states:

which seems to extend to the rrdfile name as well.

On code digging, I assume the issue is at line 126 of features/rest-measurements-api/src/main/java/org/opennms/web/rest/measurements/fetch/RrdtoolXportFetchStrategy.java' in branch 'Release-16.0.1' (for some reason I dont have 'Release-16.0.2' available in my repo...) - the specific code is:

However I dont know the codebase well enough to know if fixing the issue there is going to cause issues elsewhere - or if it should be fixed elsewhere.

Hopefully this is enough information, however if you need any more, feel free to ask

Environment

Stock install on Debian Wheezy - running on a VM for testing. Using RRD files for backend storage, stored by IP address.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Jesse White August 21, 2015 at 9:26 AM

Jesse White July 28, 2015 at 11:42 AM

Thanks for the detailed report.

You've found the appropriate line, colons in the rrdFile variable would need to be escaped there.

Fixed

Details

Assignee

Reporter

Labels

Components

Sprint

Fix versions

Affects versions

Priority

PagerDuty

Created July 28, 2015 at 11:23 AM
Updated August 21, 2015 at 1:24 PM
Resolved August 21, 2015 at 9:26 AM