Bug 1390698

Summary: Auto-tagging from name=value and name=VALUE labels breaks refresh
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: ProvidersAssignee: Beni Paskin-Cherniavsky <cben>
Status: CLOSED ERRATA QA Contact: Einat Pacifici <epacific>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.6.0CC: bazulay, cben, cpelland, dron, fsimonce, jfrey, jhardy, lavenel, mtayer, obarenbo, zgalor
Target Milestone: GAKeywords: ZStream
Target Release: 5.6.3   
Hardware: All   
OS: All   
Whiteboard: container
Fixed In Version: 5.6.3.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1382347 Environment:
Last Closed: 2016-11-30 19:57:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Container Management Target Upstream Version:
Embargoed:
Bug Depends On: 1382347    
Bug Blocks:    

Comment 2 CFME Bot 2016-11-03 21:06:23 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 12:01:46 UTC
Verified. 
Recreate: 
Provider A - 2 projects: hello3 and hello4
label hello3 ccc=abc
label hello4 ccc=abC
Use Rails console to assign 
#cat = Classification.create_category!(name: "mycat2", description: "My Cat2", read_only: true)
#ContainerLabelTagMapping.create(label_name: 'ccc', label_value: nil, tag: cat.tag

IN CFME - Refresh provider. 

View project hello3 and hello4

Actual result: 
Refresh does not crash. Autotagging assigns labels as expected.

Comment 5 errata-xmlrpc 2016-11-30 19:57:49 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