Bug 1673039

Summary: 500 Error upon first login: RuntimeError: Circular dependency detected while autoloading constant ConversionHost
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: ApplianceAssignee: Joe Rafaniello <jrafanie>
Status: CLOSED ERRATA QA Contact: Tasos Papaioannou <tpapaioa>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.9.0CC: abellott, dmetzger, obarenbo, smallamp
Target Milestone: GAKeywords: ZStream
Target Release: 5.10.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.1.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1671458 Environment:
Last Closed: 2019-03-06 09:50:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On: 1671458    
Bug Blocks:    

Comment 2 Satoe Imaishi 2019-02-06 14:29:10 UTC
Backported to Hammer branch:

commit b96fac3780976f91b26f286f14cfc308660b0632
Author: Jason Frey <fryguy9>
Date:   Tue Feb 5 15:33:17 2019 -0500

    Merge pull request #550 from jrafanie/ensure_one_autoloader_thread
    
    One semaphore to exclusively load them all
    
    (cherry picked from commit e75c9e08e7ccfe9dbd5c2b687303b6d981d4fd03)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1673039

Comment 3 Tasos Papaioannou 2019-02-12 16:02:26 UTC
Verified on 5.10.1.0.

No errors while running reproducer script:

# cat test.rb 
require_relative 'config/environment'

threads = []
4.times do
  threads << Thread.new { Api::Environment.time_attributes }
end
threads.collect(&:join)

# cp test.rb /var/www/miq/vmdb/
# vmdb
# for x in `seq 1 10`; do bundle exec ruby test.rb; done
** CFME 5.10.1.0, codename: Hammer
** CFME 5.10.1.0, codename: Hammer
** CFME 5.10.1.0, codename: Hammer
** CFME 5.10.1.0, codename: Hammer
** CFME 5.10.1.0, codename: Hammer
** CFME 5.10.1.0, codename: Hammer
** CFME 5.10.1.0, codename: Hammer
** CFME 5.10.1.0, codename: Hammer
** CFME 5.10.1.0, codename: Hammer
** CFME 5.10.1.0, codename: Hammer
#

Comment 4 CFME Bot 2019-02-13 01:50:34 UTC
New commit detected on ManageIQ/manageiq-api/hammer:

https://github.com/ManageIQ/manageiq-api/commit/b96fac3780976f91b26f286f14cfc308660b0632
commit b96fac3780976f91b26f286f14cfc308660b0632
Author:     Jason Frey <fryguy9>
AuthorDate: Tue Feb  5 15:33:17 2019 -0500
Commit:     Jason Frey <fryguy9>
CommitDate: Tue Feb  5 15:33:17 2019 -0500

    Merge pull request #550 from jrafanie/ensure_one_autoloader_thread

    One semaphore to exclusively load them all

    (cherry picked from commit e75c9e08e7ccfe9dbd5c2b687303b6d981d4fd03)

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

 lib/api/environment.rb | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

Comment 6 errata-xmlrpc 2019-03-06 09:50:42 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:0453