Cause: Relative time and duration calculations were not preventing negative numbers from showing.
Consequence: Under normal client and server clock situations negative numbers would not happen. However when there was clock skew between the browser client and the server then negative times could appear on objects like builds in the console.
Fix: Prevent relative times and durations from returning negative values by forcing them to zero.
Result: Negative relative times and durations will not appear in the console.
Description of problem:
When running `oc start-build <name> --from-repo=../<name>" the web console updates with "waiting for -1h" or "running for -1h".
Version-Release number of selected component (if applicable):
v3.3.1.3
How reproducible:
Every time, however, it's only brief until it starts to count up normally in seconds
Steps to Reproduce:
1. oc start-build <name> --from-repo=../<name>
2.
3.
Actual results:
Running for -1h
Expected results:
Running for 1s
Additional info:
Checked against v3.5.0.7+390ef18
When Build is in New & Pending status, Duration will not be calculated, neither will be shown in table(See attachment NewPending)
Duration will be calculated from 0 seconds when builds changes to Running(See attachment PendingtoRunning)
Move to VERIFIED
Comment 9Jessica Forrester
2017-03-14 17:36:32 UTC
*** Bug 1432158 has been marked as a duplicate of this bug. ***
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-2017:0884