Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1447405

Summary: Metrics API URL is blocked by uBlockOrigin browser extension
Product: OpenShift Container Platform Reporter: Matt Wringe <mwringe>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED ERRATA QA Contact: shahan <hasha>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.5.1CC: aos-bugs, hasha, jokerman, lizhou, mmccomas, mwringe, smunilla, tdawson, wgordon, wsun, xxia
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Some browser ad blocking extensions such as uBlock Origin incorrectly blocked requests for metrics from Hawkular Metrics due to a false positive in its URL pattern matching. This would prevent metrics on the OpenShift web console overview from displaying. We've fixed the problem by changing the metrics URL so that it doesn't trigger the false positive. Metrics now display correctly on the web console overview.
Story Points: ---
Clone Of: 1446308 Environment:
Last Closed: 2017-08-10 05:21:25 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:
Bug Depends On: 1430888, 1446308    
Bug Blocks:    
Attachments:
Description Flags
Simple Patch to update console to use the /m endpoint
none
pod page
none
overview page(AdBlocking is disabled)
none
overview page(AdBlocking is enabled) none

Comment 1 Matt Wringe 2017-05-02 18:15:42 UTC
This issue is to track the changes needed in the console.

Hawkular Metrics has provided an alias path for the endpoint in question.

With this change the blocked url '.../hawkular/metrics/metrics/...' can be changed to use the non-blocked url '.../hawkular/metrics/m/...'.

Note: the original endpoint is still available, we are just providing the '/m' endpoint to be available to get around the blocker.

The console will need to be updated to take advantage of this change, and since this is a backport for 3.5, a check will probably have to be done in the console code to see if it the '/m' endpoint is available in the Hawkular Metrics version which is running.

Comment 4 Samuel Padgett 2017-05-03 15:35:02 UTC
(In reply to Matt Wringe from comment #1)
> Hawkular Metrics has provided an alias path for the endpoint in question.
> 
> With this change the blocked url '.../hawkular/metrics/metrics/...' can be
> changed to use the non-blocked url '.../hawkular/metrics/m/...'.

Matt, is this change already in a hawkular-metrics image I can test?

Comment 7 Matt Wringe 2017-05-03 17:59:46 UTC
Created attachment 1275963 [details]
Simple Patch to update console to use the /m endpoint

This is a simple patch to updated the console to use the /m endpoint instead of the /metrics one.

Note: this doesn't do any check if the version its connecting to has the /m endpoint or not, which may not always be the case.

Comment 12 Samuel Padgett 2017-05-09 15:40:40 UTC
Matt, how do we recommend we test for the /m endpoint? OPTIONS seems to return 200 OK for any URL, even ones that don't exist. HEAD is a bit slow (1 second response time). GET returns a lot of data. Is there an efficient way to discover if it's there?

Comment 17 shahan 2017-06-05 08:32:48 UTC
Created attachment 1285000 [details]
pod page

Comment 18 shahan 2017-06-05 08:33:56 UTC
Created attachment 1285001 [details]
overview page(AdBlocking is disabled)

Comment 19 shahan 2017-06-05 08:34:41 UTC
Created attachment 1285002 [details]
overview page(AdBlocking is enabled)

Comment 20 shahan 2017-06-05 09:59:20 UTC
Please ignore above comment, since I used the wrong version to verify the bug. Will verify this bug again, sorry for that.

Comment 21 shahan 2017-06-06 08:12:26 UTC
 I checked this issue on OCP v3.6.95 test env, deploy metrics and installed uBlock Origin on my firefox & chrome.The result is I can see the metrics data on the pod & overview web page while AdBlocking is enabled.

Comment 22 Matt Wringe 2017-06-20 17:58:54 UTC
*** Bug 1430888 has been marked as a duplicate of this bug. ***

Comment 24 errata-xmlrpc 2017-08-10 05:21:25 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, 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/RHEA-2017:1716