Bug 1328145 - Provisioning failing in production due to ESX Hosts with Identical host names in the VMDB causing the DISPLAY name to dynamically increment over multiple refreshes
Summary: Provisioning failing in production due to ESX Hosts with Identical host names...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.5.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: GA
: 5.6.0
Assignee: Adam Grare
QA Contact: Alex Newman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-18 14:58 UTC by Thomas Hennessy
Modified: 2019-10-10 11:54 UTC (History)
9 users (show)

Fixed In Version: 5.6.0.5
Doc Type: Bug Fix
Doc Text:
In the previous version of CloudForms Management Engine, provisioning failed in production due to ESX hosts with identical host names in the VMDB causing the display name to dynamically increment over multiple refreshes. This patch when saving a host now checks to see if the found.name is the current host name plus a duplicate host name suffix. This prevents the host name from being constantly incremented with every ems_refresh which has now resolved the issue.
Clone Of:
Environment:
Last Closed: 2016-06-29 15:50:38 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
sample evm.log lines showing how the display name become altered for ip address 10.2.2230.15 (20.57 KB, text/plain)
2016-04-18 15:02 UTC, Thomas Hennessy
no flags Details
sample evm.log lines showing how the display name become altered for ip address 10.2.230.16 (58.72 KB, text/plain)
2016-04-18 15:07 UTC, Thomas Hennessy
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Thomas Hennessy 2016-04-18 14:58:51 UTC
Description of problem: two VMDB ESX host instances exist in the same VMDB. one is from BEfore a VMWARE maintenance and the other is after maintenance is complete. the host names for the two entries are identical as are the ip addresses.  the VMware host id and the HOSTS table ids are different.  However, the display name of the newer host is being incremented as follows:
original name: 'VMH-050' starts being displayed in an incrementing fashion as "VMH-050 - 2" up through "VMH-051 - 0"  and then restarts.  Notice that the final digit of the name has incremented from "0" to "1".

A second instance in the same customer with the host name of "VMH-051" is behaving in a similar manner.


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


How reproducible:


Steps to Reproduce:
1. perform emsrefres in VMware environment with deliberately backlevel ESX host
2. after two refreshes complete, place ESX host into maintenance mode and update the ESX software to a new level (like 5.1 to 5.5.0)

3. bring updated host out of maintenance mode and perform refresh
4. allow multiple refreshes to occur and monitory the display name

Actual results: display name increments as described above


Expected results: display name should not increment


Additional info: two greps of files are provided  one for each of the two ESX hosts in the customer environment where this has been encountered

Comment 2 Thomas Hennessy 2016-04-18 15:02:48 UTC
Created attachment 1148232 [details]
sample evm.log lines showing how the display name become altered for ip address 10.2.2230.15

Comment 3 Thomas Hennessy 2016-04-18 15:07:00 UTC
Created attachment 1148233 [details]
sample evm.log lines showing how the display name become altered for ip address 10.2.230.16

Comment 5 Thomas Hennessy 2016-04-21 19:47:06 UTC
Greg and Adam,
I have confirmed with the customer who reported this issue that the hosts which are duplicated were significantly changed (new hardware and software) and reintroduced back into the CFME environment.

What is troubling from a provisioning perspective is that the host name ( referred to be me as 'display name') seems to be changing each time an emsrefresh is executed making the name a moving target so that if provisioning were set up to provision to a fixed name, it would fail 9 times out of 10 because of the way the host display names are changing.

Tom Hennessy

Comment 7 CFME Bot 2016-04-26 16:30:53 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/40961a3cc401325b458d458b749b7a8b553e5d32

commit 40961a3cc401325b458d458b749b7a8b553e5d32
Author:     Adam Grare <agrare>
AuthorDate: Mon Apr 25 12:23:49 2016 -0400
Commit:     Adam Grare <agrare>
CommitDate: Mon Apr 25 16:53:35 2016 -0400

    Fix host name collision incrementing every refresh
    
    When saving a host, check to see if the found.name is the current
    host name plus a duplicate host name suffix.  This prevents the
    host name from being constantly incremented every ems_refresh.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1328145

 app/models/ems_refresh/save_inventory_infra.rb       | 12 +++++++++---
 spec/models/ems_refresh/save_inventory_infra_spec.rb | 11 +++++++++++
 2 files changed, 20 insertions(+), 3 deletions(-)

Comment 10 errata-xmlrpc 2016-06-29 15:50:38 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-2016:1348


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