Bug 1390697 - Auto-tagging from same label in 2 providers breaks refresh
Summary: Auto-tagging from same label in 2 providers breaks refresh
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.6.0
Hardware: All
OS: All
unspecified
high
Target Milestone: GA
: 5.6.3
Assignee: Beni Paskin-Cherniavsky
QA Contact: Einat Pacifici
URL:
Whiteboard: container
Depends On: 1382361
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-01 17:05 UTC by Satoe Imaishi
Modified: 2022-07-09 08:00 UTC (History)
11 users (show)

Fixed In Version: 5.6.3.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1382361
Environment:
Last Closed: 2016-11-30 19:57:43 UTC
Category: ---
Cloudforms Team: Container Management
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2839 0 normal SHIPPED_LIVE Important: CFME 5.6.3 security, bug fix, and enhancement update 2016-12-01 00:51:49 UTC

Comment 2 CFME Bot 2016-11-03 21:06:30 UTC
New commit detected on ManageIQ/manageiq/darga:
https://github.com/ManageIQ/manageiq/commit/10f235a080851b04673d8804b1910e0d887af18b

commit 10f235a080851b04673d8804b1910e0d887af18b
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Fri Oct 28 09:09:21 2016 -0400
Commit:     Oleg Barenboim <chessbyte>
CommitDate: Thu Nov 3 17:00:53 2016 -0400

    Merge pull request #11806 from cben/auto-tagging-noinsert
    
    Rewrite of auto-tagging, fixing multiple bugs
    (cherry picked from commit 9800efa91dfffd0f34314a27216ec8fe0c233b38)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1390698
    https://bugzilla.redhat.com/show_bug.cgi?id=1390697

 app/models/container_label_tag_mapping.rb          | 132 +++++------
 app/models/ems_refresh/save_inventory_container.rb |  35 ++-
 .../kubernetes/container_manager/refresh_parser.rb |  32 ++-
 .../openshift/container_manager/refresh_parser.rb  |  12 +-
 spec/models/container_label_tag_mapping_spec.rb    | 253 ++++++++++++++-------
 .../container_manager/refresh_parser_spec.rb       |  14 +-
 .../kubernetes/container_manager/refresher_spec.rb |  46 +++-
 .../container_manager/refresh_parser_spec.rb       |   3 +-
 8 files changed, 341 insertions(+), 186 deletions(-)

Comment 3 Einat Pacifici 2016-11-15 11:51:34 UTC
Verified.
Recreate: 
2 providers with projectname = hello4
For each provider - add label to hello4 labelabc=abc
In Rails console: 
#cat = Classification.create_category!(name: "mycat", description: "My Cat", read_only: true)
#ContainerLabelTagMapping.create(label_name: 'name', label_value: nil, tag: cat.tag)
(NOTE: label_name: 'name'  above should match the label name you create in openshift(s) ) 

In CFME - refresh BOTH providers

Actual Result: 
Navigate to compute --> Containers --> Projects --> hello4.
Look at Smart management table --> Table contains entry: 
My Company Tags My Cat: abc

Comment 5 errata-xmlrpc 2016-11-30 19:57:43 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://rhn.redhat.com/errata/RHSA-2016-2839.html


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