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.
References: https://github.com/ManageIQ/manageiq/issues/9096 https://github.com/ManageIQ/manageiq/pull/9097
Merged and backported https://github.com/ManageIQ/manageiq/pull/9097 to Darga.
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/26d8625cba33ca8bcd6806335ba6c752c821c0d5 commit 26d8625cba33ca8bcd6806335ba6c752c821c0d5 Author: Yaacov Zamir <yzamir> AuthorDate: Thu Jun 2 11:40:32 2016 +0300 Commit: Yaacov Zamir <yzamir> 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(-)
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 } ... ]
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
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