Bug 1283618 - Uptime of host report does not report minutes correctly
Uptime of host report does not report minutes correctly
Status: CLOSED NOTABUG
Product: ovirt-engine-reports
Classification: oVirt
Component: Reports (Show other bugs)
3.6.0
All Linux
medium Severity medium (vote)
: ovirt-3.6.2
: ---
Assigned To: Shirly Radco
Lukas Svaty
reports
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-19 07:38 EST by Lukas Svaty
Modified: 2016-02-10 14:19 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-20 07:33:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Reports
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
ylavi: ovirt‑3.6.z?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)
BR8 (51.55 KB, image/png)
2015-11-19 07:38 EST, Lukas Svaty
no flags Details

  None (edit)
Description Lukas Svaty 2015-11-19 07:38:45 EST
Created attachment 1096668 [details]
BR8

Description of problem:
In report regarding uptime of hosts uptime is displayed as hours and minutes, however minutes are all the time 0. And the uptime is moving only by hours.

Version-Release number of selected component (if applicable):
rhevm-reports-3.6.0-0.7.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Go to WA portal, hosts tab
2. Show report -> Single Host Uptime (BR8)
3. See minutes of report

Actual results:
11h 0m
12h 0m
13h 0m

Expected results:
11h 23m or just 11h.
Either display minutes correctly or remove 0m.
Comment 1 Shirly Radco 2015-11-22 04:13:20 EST
Hi,

Since this does not reproduce in my environment, please help me to debug your report or give me access to the machine.

You can use https://wiki.icinga.org/display/howtos/Debugging+JasperServer
and follow step 2 (move sql query and input control values to DEBUG) and 3. 
Then run the sql query from the jasperserver.log and replace the ? with corresponding input control values.

Let me know what value you get for uptime_mins.
Comment 2 Red Hat Bugzilla Rules Engine 2015-11-24 06:48:50 EST
This bug is not marked for z-stream, yet the milestone is for a z-stream version, therefore the milestone has been reset.
Please set the correct milestone or add the z-stream flag.
Comment 3 Red Hat Bugzilla Rules Engine 2015-11-27 00:43:35 EST
This bug is not marked for z-stream, yet the milestone is for a z-stream version, therefore the milestone has been reset.
Please set the correct milestone or add the z-stream flag.
Comment 4 Lukas Svaty 2015-11-30 07:50:50 EST
Minutes seems to be moved only by 60, which causes time to be in hours and no minutes.

 planned_downtime_mins | unplanned_downtime_mins | uptime_mins | total  
-----------------------+-------------------------+-------------+--------
                     0 |                       0 |      720.00 | 720.00
Comment 5 Shirly Radco 2015-11-30 08:19:56 EST
How are testing this?
Did you stop the host for a while and then restarted it
and checked the data after a few days?

Can I log into your test env?
Comment 6 Lukas Svaty 2015-11-30 08:29:32 EST
Test scenario:
Start DEBUG logs as per comment#2
Restart reportsd (just in case)
In webadmin portal rightclick host and show Uptime report.
Run sql command with 's/\?/$input_value/'
See output in comment#2

Setup used:
Hosts were in engine ~2 weeks, engine is older upgraded from older versions. 
So I believe whole uptime_mins is measured incorrectly as hosts are in engine longer.

I'll send you login credentials to the engine via email.
Comment 7 Lukas Svaty 2015-12-01 09:09:45 EST
After some investigation with Shirley:

Report is working correctly however problem is within the difference in aggregation timing and displaying of time.

In report obviously it is possible to display time like:
Uptime today: 5m
Downtime today: 12h55

When it's currently 13:00 that would be specific for today and it is displaying correct values. 

However as aggregation of data which report BR8 is using is run hourly so the same 5m and 12h55, would be displayed if there would be at the moment 13:55 (in some cases even 14:05 as aggregation might be late for some reason ?!?) 

I believe this is working by design, but the design is not really user friendly. 

Possible solutions:
a) Get BR8 from data that are aggregated every minute. So the sum of uptime and downtime of host of today would be the current time.

b) Notify user in the report when was the aggregation run.

c) Show user only hours and trancate the minutes, so we will avoid confusion about missing time. (Still might get 1 missing hour and end of each hour because of the Sum of uptime and downtime)

Not sure if these are possible but I would prefer a > b, and considering C only if there is any other appropriate way how to get these values from other dashboards on current date (not historical data)
Comment 8 Shirly Radco 2015-12-20 07:33:38 EST
This is by design.
We will address this request in the metrics on 4.0.

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