Bug 1334937

Summary: Production Provisioning stops working when EmsRefresh for VMware loops until restart_interval ends when host named "localhost" encountered as host name returned from VMware provider
Product: Red Hat CloudForms Management Engine Reporter: John Prause <jprause>
Component: ProvidersAssignee: Adam Grare <agrare>
Status: CLOSED ERRATA QA Contact: Dave Johnson <dajohnso>
Severity: high Docs Contact:
Priority: high    
Version: 5.4.0CC: carnott, cpelland, jdeubel, jfrey, jhardy, jocarter, mfeifer, obarenbo, simaishi
Target Milestone: GAKeywords: ZStream
Target Release: 5.5.5   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 5.5.5.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1332996 Environment:
Last Closed: 2016-07-26 15:34:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1332996    
Bug Blocks:    

Comment 3 CFME Bot 2016-06-23 18:33:18 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=c97ccb43fec2a1fb5a4708b117f6c1284e678ba1

commit c97ccb43fec2a1fb5a4708b117f6c1284e678ba1
Author:     Adam Grare <agrare>
AuthorDate: Mon Mar 7 09:22:26 2016 -0500
Commit:     Adam Grare <agrare>
CommitDate: Thu May 26 11:52:57 2016 -0400

    Fix sorting of duplicate hostnames
    
    When there are more than 10 duplicate hostnames, the default
    order will be "localhost - 9", "localhost - 8", ...,
    "localhost - 2", "localhost - 10", "localhost" which puts
    save_host_inventory into an infinite loop trying to save
    localhost - 10, never incrementing to localhost - 11.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1334937

 app/models/ems_refresh/save_inventory_infra.rb     |  2 +-
 .../ems_refresh/save_inventory_infra_spec.rb       | 25 ++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 spec/models/ems_refresh/save_inventory_infra_spec.rb

Comment 4 CFME Bot 2016-06-23 18:33:23 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=7a4e9d43a6522eb9ff19d747e0b3cc31766d6009

commit 7a4e9d43a6522eb9ff19d747e0b3cc31766d6009
Merge: 7637a6d c97ccb4
Author:     Greg Blomquist <gblomqui>
AuthorDate: Thu Jun 23 14:33:04 2016 -0400
Commit:     Greg Blomquist <gblomqui>
CommitDate: Thu Jun 23 14:33:04 2016 -0400

    Merge branch 'bz_1334937_10_duplicate_hostnames' into '5.5.z'
    
    Fix sorting of duplicate hostnames
    
    When there are more than 10 duplicate hostnames, the default
    order will be "localhost - 9", "localhost - 8", ...,
    "localhost - 2", "localhost - 10", "localhost" which puts
    save_host_inventory into an infinite loop trying to save
    localhost - 10, never incrementing to localhost - 11.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1334937
    
    See merge request !946

 app/models/ems_refresh/save_inventory_infra.rb     |  2 +-
 .../ems_refresh/save_inventory_infra_spec.rb       | 25 ++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)

Comment 7 errata-xmlrpc 2016-07-26 15:34:02 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/RHBA-2016-1488.html