Bug 1523256 - Wrong project names on Ad Hoc matrics page cause to internal server error
Summary: Wrong project names on Ad Hoc matrics page cause to internal server error
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: GA
: 5.10.0
Assignee: Bronagh Sorota
QA Contact: Dave Johnson
URL:
Whiteboard: containers
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-07 14:26 UTC by Nimrod Shneor
Modified: 2017-12-08 07:19 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1518538
Environment:
Last Closed: 2017-12-07 14:30:38 UTC
Category: ---
Cloudforms Team: Container Management
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nimrod Shneor 2017-12-07 14:26:07 UTC
+++ This bug was initially created as a clone of Bug #1518538 +++

Description of problem:
Wrong project names available in Ad hoc metrics drop-down list

When navigating to Ad-Hoc matrics page (Compute --> Containers --> Providers)
and going to the Ad-hoc metrics page, on the dropdown list you will see wrong project names.

The names that appear seem like concatenation of real project names with some UUID 

after selecting a project and click on set context, an error flash message shows up


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

How reproducible:
CFME Version:            5.9.0.11


Steps to Reproduce:
1. Navigate to provider page (Compute --> Containers --> Providers), and select your provider
2. On the upper toolbar Click on configuration button and select Ad-Hoc metrics
3. Select a project from the project list (Here you can see the wrong names)
4. Click on set context

Actual results:
No matrics shows up

Expected results:
matrics have to show up

Additional info:

After investigating the issue with yzamir we found that this issue may caused by wrong naming on the OCP side

[root@snaim-ocp-3-7-master ~]# curl -k -H "Hawkular-Tenant: $HAWKULAR_TENANT" -H "Authorization: Bearer $HAWKULAR_TOKEN"  https://$HAWKULAR_HOST/hawkular/metrics/tenants

[{"id":"_hawkular_admin"},{"id":"_system"},{"id":"openshift-infra:633c4640-d425-11e7-a6bf-001a4a490032"},{"id":"test-project:40fb82cb-d448-11e7-a4c6-001a4a490032"},{"id":"openshift-metrics:405e61b3-d432-11e7-a6bf-001a4a490032"},{"id":"default:63425785-d425-11e7-a6bf-001a4a490032"}][root@snaim-ocp-3-7-master ~]# 
[root@snaim-ocp-3-7-master ~]# 

[root@snaim-ocp-3-7-master ~]# oc version
oc v3.7.0
kubernetes v1.7.0+695f48a16f
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://snaim-ocp-3-7-master.cfme2.lab.eng.rdu2.redhat.com:8443
openshift v3.7.0
kubernetes v1.7.0+695f48a16f
[root@snaim-ocp-3-7-master ~]#

--- Additional comment from Shalom Naim on 2017-11-29 02:06:48 EST ---

How reproducible:
100%

--- Additional comment from Yaacov Zamir on 2017-11-29 03:51:27 EST ---

a. The fix for the UI is trivial
b. The underlying bug is in Hawkualr (*) and the UI is correctly showing the wrong data it gets from Hakular's API.

We need PM advice:
Do we fix the UI and hide the underliying bug in Hawkular ?
Or
Do we wait for a fix in Hawkular, that may not be in time for users using the buggy versions Hawkular.

(*) according to Hawkular API documentation the query should return a list of "tenant_names", the "tenants_name:hash" returned value not as advertised.

http://www.hawkular.org/docs/rest/rest-metrics.html#_tenant

--- Additional comment from Yaacov Zamir on 2017-11-29 07:44:38 EST ---

Opened a POC on how we can work around this in the UI:
https://github.com/ManageIQ/manageiq-ui-classic/pull/2860

this patch is not for use, just to show we can work around this if we need to.

--- Additional comment from Yaacov Zamir on 2017-12-04 09:23:11 EST ---

submitted upstream (a fix on manageiq side)
https://github.com/ManageIQ/manageiq-ui-classic/pull/2860

--- Additional comment from Yaacov Zamir on 2017-12-04 12:19:38 EST ---

merged upstream (a fix on manageiq side)
https://github.com/ManageIQ/manageiq-ui-classic/pull/2860


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