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
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).
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.
(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.
(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
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(-)
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.
Created attachment 1214267 [details] List of available fields - showing full list of selection Screenshots contain full list of available fields.
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).
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.
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.
(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?
> 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
(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.
Per the discussion above & discussion with PM, MOving this bug back to POST with the limitation of Bug 1392379
Verified with limitation of Bug 1392379 as per comment 20