Bug 1666324

Summary: The Host configuration chart shows 100% even if few hosts are not in sync or reporting.
Product: Red Hat Satellite Reporter: Amaani S Karimi <akarimi>
Component: DashboardAssignee: Amir <afeferku>
Status: CLOSED ERRATA QA Contact: Radovan Drazny <rdrazny>
Severity: high Docs Contact:
Priority: high    
Version: 6.4.0CC: afeferku, bkearney, egolov, jesper.schmidt, jjeffers, mhulan, mmccune, pcreech, satellite6-bugs, tbrisker
Target Milestone: 6.7.4Keywords: EasyFix, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: All   
Whiteboard:
Fixed In Version: foreman-1.24.1.28-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-30 13:12:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Puppet chart none

Description Amaani S Karimi 2019-01-15 14:05:52 UTC
Description of problem:

"Host configuration chart for Puppet" on Dashboard shows 100% ok, even though there are eg. 2 out of 1000 hosts in "out of sync".
The problem here is: When it says 100% ok, it should mean *all* - not almost all.

This problem is probably due to a roundup function that makes everything above and equal to 99.5% into 100% in the graph.
While the calculation is mathematically correct, it is pretty misleading, since you can not have fractions of a host.

Examples:
* When 99.75% out of 1000 hosts are OK, it should show 99% and not 100%.


Version-Release number of selected component (if applicable):

Red Hat Satellite 6.3.4 

How reproducible:

100%


Actual results:

When it says 100% ok, it should mean *all* whereas it is not the case here.

Expected results:

It should not show 100% if some host is still not proper this could mislead.

Comment 5 Marek Hulan 2019-06-25 15:03:11 UTC
Created redmine issue https://projects.theforeman.org/issues/27151 from this bug

Comment 6 Marek Hulan 2019-06-25 15:18:50 UTC
I was able to reproduce, it's not aligned to any specific version as of now. It looks to be an issue in the underlying C3 library.

Comment 7 JazPerSen 2019-06-26 08:28:26 UTC
So, when will it be fixed?

Comment 8 Marek Hulan 2019-06-26 11:41:35 UTC
I'm sorry, we can't guarantee any specific version at this point. We have someone looking at this right now. Given it's in a library that is used by others, the patch will probably need to make the behavior configurable, as other usages of the charting library may want keeping the rounding. Based on how complicated/risky the cherrypicking of the patch can be, we can estimate whether it's possible to backport to existing stable versions.

Comment 9 JazPerSen 2019-06-26 12:50:08 UTC
FYI: Since patches usually needs to be applied every time we update/upgrade, we will have to keep the amount of patches to a bare minimum.

We are in contact with another customer of yours, who are using the Satellite with 3500 hosts connected. If I calculate this right, this would result in the percentage of "ok hosts" is still showing 100%, even though 17 hosts is "out of sync".

We can't be the only user/customer finding this behavior weird and annoying, and yet you consider making this *bugfix* configurable?

Comment 10 Marek Hulan 2019-06-27 12:44:25 UTC
An update: the PR with the fix was opened at https://github.com/patternfly/patternfly-react/pull/2375 if anyone wants to follow the progress. This was reported on 6.4 which may be more problematic to backport the fix to. How possible it is to upgrade to 6.5?

Comment 11 JazPerSen 2019-06-28 12:18:00 UTC
We're already at Sat 6.5, so a fix for that version would be just fine for us.

But: With the "precision=1" mentioned in the PR, won't we just move the problem to the next "decimal"? (EXP+1, from 199 hosts out of 200, to 1990 out of 2000 hosts)? 

Even with "precision=2", we will meet the same problem when having 19999 out of 20000, right? But for Sat that would probably not be the largest problem :-)

(Disclaimer: Calculations may be wrong)

How about using a "~" to signify an approximate? Or maybe "<" and ">" for use with 100% and 0%, respectively?

Comment 13 Marek Hulan 2019-07-11 15:21:14 UTC
The patch meanwhile changed so that the rounding shouldn't occur even on bigger numbers. So it would say 99.99%, while correctly it's 99.9999%. I hope this would be acceptable.

Comment 16 JazPerSen 2019-08-06 13:55:21 UTC
Probably fine. Thanks.

Comment 18 Bryan Kearney 2020-03-23 16:00:59 UTC
Upstream bug assigned to afeferku

Comment 19 Bryan Kearney 2020-03-23 16:01:07 UTC
Upstream bug assigned to afeferku

Comment 20 Bryan Kearney 2020-03-24 12:01:15 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27151 has been resolved.

Comment 24 Radovan Drazny 2020-08-13 08:16:45 UTC
Created attachment 1711285 [details]
Puppet chart

Tested on Sat 6.8 Snap 10. Even with 1000 of hosts, and only one synced (it is easier to get 1000 host not-synced and only one synced than the opposite :-) ), the chart shows less than 100% - see the attached screenshot.

Comment 28 Radovan Drazny 2020-09-21 16:20:48 UTC
Tested on Sat 6.7.4 Snap 1 same way as in comment #24. 1 host out of 1100 meant 99.9% displayed.

Comment 33 errata-xmlrpc 2020-09-30 13:12:09 UTC
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 (Important: Satellite 6.7.4 Async Bug Fix Update), 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/RHSA-2020:4127