Bug 1385613

Summary: Middleware: Capacity & Utilization, 'Daily' loads previous day(23:00) data
Product: Red Hat CloudForms Management Engine Reporter: Jeeva Kandasamy <jkandasa>
Component: UI - OPSAssignee: Lucas Ponce <lponce>
Status: CLOSED CURRENTRELEASE QA Contact: Jeeva Kandasamy <jkandasa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: cpelland, dajohnso, hkataria, jhardy, mpovolny, obarenbo
Target Milestone: GAKeywords: TestOnly, Triaged
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: Hawkular
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1394327 (view as bug list) Environment:
Last Closed: 2017-06-12 16:10:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Middleware Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1394327    
Attachments:
Description Flags
chart page
none
start time issue on most recent hour chart none

Description Jeeva Kandasamy 2016-10-17 12:13:44 UTC
Created attachment 1211320 [details]
chart page

Description of problem:
In Hawkular Capacity & Utilization chart, Data should load for that day only(00:00 ~ 23:59) loads previous day (23:00 ~ 22:00) data. In chart date format is like HH:MM, when we start previous day at 23:00, chart assumes it is for end of the day. and displays wrongly.


Version-Release number of selected component (if applicable):
Version: 5.7.0.4-alpha1.20161005153002_cfc8a23
Browser: Chrome
Browser Version: 49
Browser OS: Linux

Hawkular Services:	Running	0.0.16.Final-redhat-1 (commit 3d920b87b2fce2c326f6e9ae9190cb39d43852c1)	
Hawkular Metrics:	Running	0.20.1.Final	
Hawkular Alerts:	Running	1.2.2.Final	
Hawkular Inventory:	Running	0.20.0.Final

How reproducible:
100%

Steps to Reproduce:
1. Select any server
2. Go to 'Utilization >> Monitoring'
3. Have a look at chart or table

Actual results
Fetches data from 23:00 to 22:00


Expected results:
Should fetch data from 00:00 to 23:00

Additional info:
Screen shot is attached.

Comment 4 Lucas Ponce 2016-10-18 10:45:29 UTC
Sorry I mis-interpreted the BZ description.
Yes, I can see a graph starting from 00:00 but data starting from 23:00.

I am going to study if this is related to middleware provider or if this is general for the graph component which is shared across providers.

(Not specific logic from Middleware Provider)

Comment 5 Jeeva Kandasamy 2016-10-18 11:37:55 UTC
@lponce I believe it is based on start time and end time of the day and `bucketDuration` will be `1h` or `60m`. I feel that on start time, if one seconds falls on previous day it is taking entire hour.

Comment 6 Lucas Ponce 2016-10-18 17:31:37 UTC
Thanks Jeeva.

Fixed on this PR:

https://github.com/ManageIQ/manageiq/pull/12033

Comment 7 Jeeva Kandasamy 2016-10-27 10:57:34 UTC
Created attachment 1214574 [details]
start time issue on most recent hour chart

Lucas, I can see this issue on "Most Recent Hour" selection too. Please refer screen shot. I do not know this PR fixes this issue too. https://github.com/ManageIQ/manageiq/pull/12033

Comment 8 Lucas Ponce 2016-10-27 11:37:50 UTC
I guess it should be fixed in that PR.
The root case was the wrong interval calculation for the buckets.
The fix is applied in general.

Please, let me know if it is fixed once this PR is merged.

Thanks.

Comment 9 CFME Bot 2016-11-02 14:31:34 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/c8a7665d5350548e1283b48554eb8b6c46e77615

commit c8a7665d5350548e1283b48554eb8b6c46e77615
Author:     Lucas Ponce <ponce.ballesteros>
AuthorDate: Tue Oct 18 19:27:03 2016 +0200
Commit:     Lucas Ponce <ponce.ballesteros>
CommitDate: Tue Oct 25 10:00:55 2016 +0200

    Adjust middleware metrics from 00:00 to 23:00
    https://bugzilla.redhat.com/show_bug.cgi?id=1385613

 .../providers/hawkular/middleware_manager/live_metrics_capture.rb     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comment 10 CFME Bot 2016-11-07 23:26:19 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/4f01e117196792a7d0a699890674b47a34953548

commit 4f01e117196792a7d0a699890674b47a34953548
Author:     Greg Blomquist <blomquisg>
AuthorDate: Wed Nov 2 10:31:02 2016 -0400
Commit:     Oleg Barenboim <chessbyte>
CommitDate: Mon Nov 7 18:24:10 2016 -0500

    Merge pull request #12033 from lucasponce/bz-1385613
    
    Adjust middleware metrics from 00:00 to 23:00
    (cherry picked from commit b5e4acaa3d6764a9762c1b13b40de06b50a1af37)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1385613

 .../middleware_manager/live_metrics_capture.rb     |   4 +-
 .../hawkular/middleware_manager/hawkular_helper.rb |   4 +-
 .../middleware_datasource_spec.rb                  |   2 +-
 .../middleware_messaging_spec.rb                   |   2 +-
 .../middleware_manager/middleware_server_spec.rb   |   2 +-
 .../middleware_manager/middleware_datasource.yml   | 158 ++--
 .../middleware_manager/middleware_messaging.yml    | 838 ++++++++++-----------
 .../middleware_manager/middleware_server.yml       | 644 ++++++++--------
 8 files changed, 827 insertions(+), 827 deletions(-)