Bug 1382720 - [RFE] Make OpenShift Labels available in CloudForms Reporting
Summary: [RFE] Make OpenShift Labels available in CloudForms Reporting
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.8.0
Assignee: Ari Zellner
QA Contact: Einat Pacifici
URL:
Whiteboard:
Depends On: 1392379
Blocks: 1386259 1390713
TreeView+ depends on / blocked
 
Reported: 2016-10-07 13:50 UTC by Loic Avenel
Modified: 2017-06-12 17:25 UTC (History)
10 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1386259 1390713 (view as bug list)
Environment:
Last Closed: 2017-06-12 17:25:09 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
evm.log and two screenshots (1.19 MB, application/x-gzip)
2016-10-26 11:41 UTC, Einat Pacifici
no flags Details
List of available fields - showing full list of selection (1.11 MB, application/x-gzip)
2016-10-26 11:41 UTC, Einat Pacifici
no flags Details

Description Loic Avenel 2016-10-07 13:50:57 UTC
Description of problem: OpenShift labels are not available in CloudForms Reporting 


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


How reproducible: Always


Steps to Reproduce:
1. Create a reported based on OpenShift
2. Look in fields
3.

Actual results: OpenShift Labels are not available 


Expected results: OpenShift Labels are not available 


Additional info: This is top requirement for UHG in ChargeBack

Comment 3 Federico Simoncelli 2016-10-10 08:19:15 UTC
I assume we want this both in chargeback and regular reports (they should be the same but IIRC implementation-wise they need two distinct fixes).

Comment 4 Ari Zellner 2016-10-10 11:55:08 UTC
Upstream PR: https://github.com/ManageIQ/manageiq/pull/10459

This PR is verified to solve the problem. In chargeback, the kubernetes labels will appear as selectable columns such as "My Company Tag Kubernetes label 'mylabel'"

They already appear in regular reports but as custom labels and not tags.
I suggest to keep this behaviour at this time because of deadlines.

Comment 5 Federico Simoncelli 2016-10-10 12:25:43 UTC
(In reply to Ari Zellner from comment #4)
> Upstream PR: https://github.com/ManageIQ/manageiq/pull/10459
> 
> This PR is verified to solve the problem. In chargeback, the kubernetes
> labels will appear as selectable columns such as "My Company Tag Kubernetes
> label 'mylabel'"

Auto-tagging is not involved, we are talking about exposing the available labels on projects in the columns for reports/chargeback.

Comment 6 Ari Zellner 2016-10-10 15:18:10 UTC
(In reply to Federico Simoncelli from comment #5)
> (In reply to Ari Zellner from comment #4)
> > Upstream PR: https://github.com/ManageIQ/manageiq/pull/10459
> > 
> > This PR is verified to solve the problem. In chargeback, the kubernetes
> > labels will appear as selectable columns such as "My Company Tag Kubernetes
> > label 'mylabel'"
> 
> Auto-tagging is not involved, we are talking about exposing the available
> labels on projects in the columns for reports/chargeback.


Right, I misunderstood that. Heres a possible solution: https://github.com/ManageIQ/manageiq/pull/11794

Comment 7 CFME Bot 2016-10-17 16:22:04 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/5a3f888d8d1d32a2e32ad74da8c0b8fddf860293

commit 5a3f888d8d1d32a2e32ad74da8c0b8fddf860293
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Thu Oct 13 20:21:23 2016 -0400
Commit:     Oleg Barenboim <chessbyte>
CommitDate: Fri Oct 14 11:38:28 2016 -0400

    Merge pull request #11794 from zeari/chargeback_kubernetes_labels
    
    Enable custom attributes for chargeback reports
    (cherry picked from commit 9b096826f16cef9f6b026dddf73cee96e6c69430)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1382720

 .../report_controller/reports/editor.rb            |  2 +-
 app/models/chargeback.rb                           | 27 ++++++++++++++++++++--
 app/models/chargeback_container_image.rb           |  3 ++-
 app/models/chargeback_container_project.rb         |  7 ++----
 app/models/chargeback_vm.rb                        |  7 ++----
 app/models/miq_report.rb                           |  2 +-
 lib/miq_expression.rb                              |  2 +-
 7 files changed, 34 insertions(+), 16 deletions(-)

Comment 9 Einat Pacifici 2016-10-26 11:41:00 UTC
Created attachment 1214266 [details]
evm.log and two screenshots

Reassigning to development. 
The openshift label is not available for selection from the chargeback report drop down list. 
Attaching evm.log and two screenshots.
Showing project label and showing no available label in the field selection.

Comment 10 Einat Pacifici 2016-10-26 11:41:57 UTC
Created attachment 1214267 [details]
List of available fields - showing full list of selection

Screenshots contain full list of available fields.

Comment 14 Beni Paskin-Cherniavsky 2016-11-03 20:47:44 UTC
Ari knows the current status better, but for the record there were issues with label names containing dot and/or slash:
https://github.com/ManageIQ/manageiq/issues/10482
I didn't follow the progress there but it's associated with 4 PRs, 2 still unmerged, none on darga...

And IIUC it all rests on the original support for custom attr in reports:
https://github.com/ManageIQ/manageiq/pull/9451
which was darga/no (IMO with good reason, it's quite invasive).

Comment 15 Einat Pacifici 2016-11-07 10:19:24 UTC
Upon further investigation with dev - The behaviour of labels is such that upon restarting the evmserverd service, all new labels appear in the Field selection box. 
Example Scenario: 
Existing project name = hello4
1. Add new label: oc label namespace hello4 Level=RedRoom
2. In CFME navigate to reports. 
3. Select Create new report.
4. Select - Base the report on: Chargeback for Projects
5. View Available fields - The value: Level will NOT be available for selection. 

RESTART EVMSERVERD 

Now, follow steps 2 - 4 above. 
Follow step 5 below: 
5. View Available fields - The value: Level WILL be available for selection.

Comment 16 Barak 2016-11-07 11:14:32 UTC
It looks like this is a reports infrastructure issue,

github issue opened https://github.com/ManageIQ/manageiq/issues/12465

Per the behavior it looks like the server hold a cache of those fields so after evm server restart those labels are visible and available for selection in the reports.

Comment 17 Loic Avenel 2016-11-07 20:54:52 UTC
(In reply to Einat Pacifici from comment #15)
> Upon further investigation with dev - The behaviour of labels is such that
> upon restarting the evmserverd service, all new labels appear in the Field
> selection box. 
> Example Scenario: 
> Existing project name = hello4
> 1. Add new label: oc label namespace hello4 Level=RedRoom
> 2. In CFME navigate to reports. 
> 3. Select Create new report.
> 4. Select - Base the report on: Chargeback for Projects
> 5. View Available fields - The value: Level will NOT be available for
> selection. 
> 
> RESTART EVMSERVERD 
> 
> Now, follow steps 2 - 4 above. 
> Follow step 5 below: 
> 5. View Available fields - The value: Level WILL be available for selection.


Do you refresh the provider after adding the label?

Comment 18 Beni Paskin-Cherniavsky 2016-11-08 08:43:21 UTC
> Do you refresh the provider after adding the label?

Yes, we first refreshed and already saw the Label on the project,
then it still was not available in reports.

The exact condition is that if you had *first* opened report editor and 
selected same "Base the report on: ...", the set of fields for that type
of reports is cached forever until restart.
See bug 1392379, https://github.com/ManageIQ/manageiq/issues/12465
for full details.
Einat, if you

Comment 19 Loic Avenel 2016-11-08 08:59:42 UTC
(In reply to Beni Paskin-Cherniavsky from comment #18)
> > Do you refresh the provider after adding the label?
> 
> Yes, we first refreshed and already saw the Label on the project,
> then it still was not available in reports.
> 
> The exact condition is that if you had *first* opened report editor and 
> selected same "Base the report on: ...", the set of fields for that type
> of reports is cached forever until restart.
> See bug 1392379, https://github.com/ManageIQ/manageiq/issues/12465
> for full details.
> Einat, if you

Thanks. I did talk to Gregg T yesterday. The caching is there for UI performance. If every time, the list of fields was built on the fly, this will take a long time. Gregg is investigating with Dan C what are our options but I doubt there is an easy fix we can back port.

Comment 20 Barak 2016-11-09 15:41:00 UTC
Per the discussion above & discussion with PM,
MOving this bug back to POST with the limitation of Bug 1392379

Comment 22 Einat Pacifici 2017-05-18 14:00:36 UTC
Verified with limitation of Bug 1392379 as per comment 20


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