Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1347709 - When reading hawkular metrics, user receives a TypeError Exception.
When reading hawkular metrics, user receives a TypeError Exception.
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers (Show other bugs)
5.6.0
Unspecified Unspecified
urgent Severity urgent
: GA
: 5.6.0
Assigned To: Yaacov Zamir
Einat Pacifici
container
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-06-17 08:35 EDT by Chris Pelland
Modified: 2018-04-01 09:52 EDT (History)
4 users (show)

See Also:
Fixed In Version: 5.6.0.12
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-29 12:07:48 EDT
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 14:50:04 EDT

  None (edit)
Description Chris Pelland 2016-06-17 08:35:10 EDT
What happens:
If the Hawkular data struct is empty we get an the error.

What should happen:
We should check for empty data structs.

Examples:
Full data struct:

{"start"=>1464856440000,
  "end"=>1464856460000,
  "min"=>13548162076446.0,
  "avg"=>13548162076446.0,
  "median"=>13548162076446.0,
  "max"=>13548162076446.0,
  "sum"=>13548162076446.0,
  "samples"=>1,
  "empty"=>false}
Empty data struct:
{"start"=>1464856460000, "end"=>1464856480000, "empty"=>true}

This Exception can be reproduced by running:
ContainerNode.first.perf_capture('realtime') on a node with some empty data.
Comment 3 Oleg Barenboim 2016-06-20 14:49:17 EDT
Merged and backported https://github.com/ManageIQ/manageiq/pull/9097 to Darga.
Comment 4 CFME Bot 2016-06-20 14:50:53 EDT
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/26d8625cba33ca8bcd6806335ba6c752c821c0d5

commit 26d8625cba33ca8bcd6806335ba6c752c821c0d5
Author:     Yaacov Zamir <yzamir@gmail.com>
AuthorDate: Thu Jun 2 11:40:32 2016 +0300
Commit:     Yaacov Zamir <yzamir@gmail.com>
CommitDate: Sun Jun 19 14:13:04 2016 +0300

    When reading hawkular metrics we can get a TypeError Exception.
    
    What happen:
    If the Hawkular data struct is empty we get an the error.
    What should happen:
    We should check for empty data structs.
    
    Issue:
    https://github.com/ManageIQ/manageiq/issues/9096
    
    Bugzilla:
    https://bugzilla.redhat.com/show_bug.cgi?id=1347709

 .../kubernetes/container_manager/metrics_capture/capture_context.rb     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 5 Yaacov Zamir 2016-06-26 10:01:18 EDT
Information about version of hawkular:

Version 0.8.0 of hawkular will not fail on TypeError Exception when reading metrics.

Version 0.17.0 of hawkular will fail on TypeError Exception when reading metrics.


Examples:
---------------------------
Version of hawkular 0.8.0.Final-redhat-1:

Retruen when asked /status:
{"MetricsService":"STARTED","Implementation-Version":"0.8.0.Final-redhat-1","Built-From-Git-SHA1":"826f08dd34912ad455a4cb2b34f2e79cd79ace9a"}

Return when asked for /metrics/counters/machine%2Fose-node1.qa.lab.tlv.example.com%2Fnetwork%2Frx/data/?bucketDuration=20s&start=1466944540000:

[ .... {
    "start": 1466949340000,
    "end": 1466949360000,
    "min": "NaN",
    "avg": "NaN",
    "median": "NaN",
    "max": "NaN",
    "percentile95th": "NaN",
    "samples": 0,
    "empty": true
} ... ]

---------------------------
Version of hawkular 0.17.0-SNAPSHOT:

Retruen when asked /status:
{"MetricsService":"STARTED","Implementation-Version":"0.17.0-SNAPSHOT","Built-From-Git-SHA1":"56ede2a1bf69da749b4e7092b4b8ed7a399e8f2f"}

Return when asked for /metrics/counters/machine%2Fose-node1.qa.lab.tlv.example.com%2Fnetwork%2Frx/data/?bucketDuration=20s&start=1466944540000:

[ .... {
    "start": 1466949340000,
    "end": 1466949360000,
    "empty": true
} ... ]
Comment 6 Yaacov Zamir 2016-06-27 06:29:23 EDT
how to reproduce:

1. use an openshift/kubernetes provider with hawkular version 0.17.0.
2. read metrics.

what happen:
no metrics

what should happen:
metrics are read

fixed by (already merged):
https://github.com/ManageIQ/manageiq/pull/9097
Comment 8 errata-xmlrpc 2016-06-29 12:07:48 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1348

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