Bug 1032685 - Unexpected MeasurementScheduleRequest with metric name "rhq.availability"
Unexpected MeasurementScheduleRequest with metric name "rhq.availability"
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: UI (Show other bugs)
JON 3.2
Unspecified Unspecified
unspecified Severity high
: ER07
: JON 3.2.0
Assigned To: Thomas Segismont
Mike Foley
:
Depends On: 1031556
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-20 10:09 EST by Thomas Segismont
Modified: 2014-01-02 15:36 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1031556
Environment:
Last Closed: 2014-01-02 15:36:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Thomas Segismont 2013-11-20 10:09:43 EST
+++ This bug was initially created as a clone of Bug #1031556 +++

Description of problem:
Unexpected MeasurementScheduleRequest with metric name "rhq.availability"

"rhq.availability" should never be passed to #getValues

Version-Release number of selected component (if applicable):
4.9-SNAPSHOT

How reproducible:
Always

Steps to Reproduce:
1.Inventory a Tomcat server
2.Watch the agent logs

Actual results:

Exception thrown because most Tomcat components expect a ":" in the metric name.

2013-11-18 10:20:44,733 ERROR [WorkerThread#0[127.0.0.1:52296]] (rhq.core.pc.measurement.MeasurementManager)- Could not get measurement values
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1911)
	at org.jboss.on.plugins.tomcat.TomcatConnectorComponent.getValues(TomcatConnectorComponent.java:137)
	at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocation.call(ResourceContainer.java:654)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:744)


Expected results:
No exception

--- Additional comment from Thomas Segismont on 2013-11-18 11:44:12 CET ---

It looks like it happens only when you change the availability schedule of a resource.

--- Additional comment from Thomas Segismont on 2013-11-18 18:35:50 CET ---

Eventually found the exact details. These supersede the details from Comment #1

How reproducible:
Always

Steps to Reproduce:
1.Inventory a Tomcat server
2.Navigate to the Monitoring > Metrics tab

Actual results:

Exception thrown because most Tomcat components expect a ":" in the metric name.

2013-11-18 10:20:44,733 ERROR [WorkerThread#0[127.0.0.1:52296]] (rhq.core.pc.measurement.MeasurementManager)- Could not get measurement values
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1911)
	at org.jboss.on.plugins.tomcat.TomcatConnectorComponent.getValues(TomcatConnectorComponent.java:137)
	at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocation.call(ResourceContainer.java:654)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:744)


Expected results:
No exception

Additional info:
This comes from the MetricsViewDataSource#queryResourceMetrics implementation. We query all resource metrics, even those with data type "AVAILABILITY".

--- Additional comment from Thomas Segismont on 2013-11-18 18:38:49 CET ---

commit 9837ddc08e8cd47714ac92c508b707b42acd88bb
Author: Thomas Segismont <tsegismo@redhat.com>
Date:   Mon Nov 18 18:38:02 2013 +0100

When looking for live data, filter measurement definitions to exclude those of data type AVAILABILITY
Comment 1 Thomas Segismont 2013-11-20 10:12:49 EST
Cherry picked to release/jon3.2.x

commit ce9fe004501a6f30e73a1727e25df1deb2e4f0f7
Author: Thomas Segismont <tsegismo@redhat.com>
Date:   Mon Nov 18 18:38:02 2013 +0100
Comment 2 Simeon Pinder 2013-11-22 00:01:49 EST
Moving to ON_QA as available to test in ER7 and later brew builds.
Comment 3 Sunil Kondkar 2013-12-06 09:03:28 EST
Verified on Version : 3.2.0.GA Build Number : 7b00246:6d13523

Followed steps and verified that there is no exception in agent log.

Note You need to log in before you can comment on or make changes to this bug.