Bug 1719399

Summary: vCenter is rebuilt without removing Provider from CloudForms which causes duplicate hosts with appending -2 in name
Product: Red Hat CloudForms Management Engine Reporter: Tuan <tuado>
Component: ProvidersAssignee: Adam Grare <agrare>
Status: CLOSED ERRATA QA Contact: Kedar Kulkarni <kkulkarn>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.9.8CC: agrare, dmetzger, gtanzill, jfrey, jhardy, kkulkarn, obarenbo, rspagnol, simaishi
Target Milestone: GA   
Target Release: 5.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.0.12 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-12 13:36:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:

Description Tuan 2019-06-11 17:21:28 UTC
Description of problem:
The customer did not remove the VMWare provider before rebuilding vcenter. This has caused CloudForms to see the hosts as new and is appending the hostnames with "-2".

I have tested this by adding a provider, removing the provider and re-adding. The hosts were linked back up and had matching ems_ref values

This is not the case with the customer as their hosts output shows the appending/duplicate hosts with a different ems_ref




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

How reproducible:


Steps to Reproduce:
1.Add provider
2.Rebuild hosts through provider without removing provider from CloudForms first
3.

Actual results:


Expected results:


Additional info:

Comment 12 CFME Bot 2019-07-02 20:26:22 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/701f6c0850fb143140eb62bdee9685a3781e9ec7
commit 701f6c0850fb143140eb62bdee9685a3781e9ec7
Author:     Adam Grare <agrare>
AuthorDate: Thu Jun 27 11:30:52 2019 -0400
Commit:     Adam Grare <agrare>
CommitDate: Thu Jun 27 11:30:52 2019 -0400

    Reconnect archived hosts with a different ems_ref

    If a vCenter is rebuilt all imported hosts will have different ems_refs.
    This shouldn't prevent these hosts from being reconnected.

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

 app/models/ems_refresh/save_inventory_infra.rb | 4 +-
 spec/models/ems_refresh/save_inventory_infra_spec.rb | 29 +-
 2 files changed, 25 insertions(+), 8 deletions(-)

Comment 13 Kedar Kulkarni 2019-07-29 14:31:31 UTC
ON CFME 5.11.0.16 I tested the scenario using comment 10 and it worked as expected. No more host duplication.

Comment 15 errata-xmlrpc 2019-12-12 13:36:36 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/RHBA-2019:4199