Bug 1531117

Summary: EC2 items with empty Name tag have no name/id displayed
Product: Red Hat CloudForms Management Engine Reporter: Matouš Mojžíš <mmojzis>
Component: ProvidersAssignee: Alexander Zagaynov <azagayno>
Status: CLOSED ERRATA QA Contact: Matouš Mojžíš <mmojzis>
Severity: high Docs Contact:
Priority: medium    
Version: 5.9.0CC: bsorota, gblomqui, jfrey, jhardy, obarenbo, simaishi, smallamp
Target Milestone: GA   
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ui:ec2
Fixed In Version: 5.10.0.17 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-07 23:00:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: AWS Target Upstream Version:
Embargoed:
Attachments:
Description Flags
vpc name not shown
none
volume name not displayed none

Description Matouš Mojžíš 2018-01-04 15:49:13 UTC
Created attachment 1377002 [details]
vpc name not shown

Description of problem:


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

How reproducible:
Always

Steps to Reproduce:
1. Add ec2 provider
2. Have item with tag: "Name": "" (empty field)
3.

Actual results:
Items have no name/id displayed.

Expected results:
Items with empty names should act as items with no names = display their id instead.

Additional info:
Attached two screenshots. First shows vpc which has empty Name tag and second shows volume with empty Name tag.

Comment 2 Matouš Mojžíš 2018-01-04 15:49:41 UTC
Created attachment 1377003 [details]
volume name not displayed

Comment 3 Bronagh Sorota 2018-02-22 18:35:45 UTC
Hi Alex,
We fixed this bug for images already, see:
https://github.com/ManageIQ/manageiq-providers-amazon/pull/273
https://github.com/ManageIQ/manageiq-providers-amazon/pull/322

However, this bug applies to any inventory type. Instead of fixing it in the parse_* methods, see if you can fix in here:
https://github.com/ManageIQ/manageiq-providers-amazon/blob/master/app/models/manageiq/providers/amazon/refresh_helper_methods.rb#L36..#L38

Comment 4 Alexander Zagaynov 2018-09-12 14:55:33 UTC
PR: https://github.com/ManageIQ/manageiq-providers-amazon/pull/482

Comment 5 CFME Bot 2018-09-26 13:42:01 UTC
New commit detected on ManageIQ/manageiq-providers-amazon/hammer:

https://github.com/ManageIQ/manageiq-providers-amazon/commit/a5dd7c4a01e5f65f30ec478288b12a2eda8f2468
commit a5dd7c4a01e5f65f30ec478288b12a2eda8f2468
Author:     Ladislav Smola <lsmola>
AuthorDate: Tue Sep 25 14:45:17 2018 -0400
Commit:     Ladislav Smola <lsmola>
CommitDate: Tue Sep 25 14:45:17 2018 -0400

    Merge pull request #482 from AlexanderZagaynov/BZ-1531117_name_tag

    avoid blank names by using uids

    (cherry picked from commit 4197be8d1dee08a18c87483cf5ada03bebb6f5c1)

    https://bugzilla.redhat.com/show_bug.cgi?id=1531117

 app/models/manageiq/providers/amazon/cloud_manager/refresh_parser.rb | 4 +-
 app/models/manageiq/providers/amazon/inventory/collector/target_collection.rb | 5 +-
 app/models/manageiq/providers/amazon/inventory/parser.rb | 5 +-
 app/models/manageiq/providers/amazon/inventory/parser/cloud_manager.rb | 21 +-
 app/models/manageiq/providers/amazon/inventory/parser/network_manager.rb | 2 +-
 app/models/manageiq/providers/amazon/network_manager/refresh_parser.rb | 19 +-
 app/models/manageiq/providers/amazon/parser_helper_methods.rb | 5 +-
 app/models/manageiq/providers/amazon/refresh_helper_methods.rb | 5 +-
 spec/models/manageiq/providers/amazon/cloud_manager/refresh_parser_spec.rb | 22 +
 spec/models/manageiq/providers/amazon/network_manager/refresh_parser_spec.rb | 23 +
 spec/models/manageiq/providers/amazon/storage_manager/ebs/refresh_parser_spec.rb | 31 +
 11 files changed, 111 insertions(+), 31 deletions(-)

Comment 7 Matouš Mojžíš 2018-10-02 11:32:45 UTC
Verified in 5.10.0.17. ID is displayed as name when there is empty tag Name.

Comment 8 errata-xmlrpc 2019-02-07 23:00:53 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://access.redhat.com/errata/RHSA-2019:0212