Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1315437

Summary: Intermittent issue with syncing content from RHCI: NameError: uninitialized constant Katello::Repository::Katello::RepositoryErratum
Product: Red Hat Satellite Reporter: jkim
Component: Content ManagementAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.7CC: bkearney, jkim, jmatthew
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-13 20:06:56 UTC Type: Bug
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:    
Bug Blocks: 1212602    
Attachments:
Description Flags
exception backtrace portion in the foreman deployment.log none

Description jkim 2016-03-07 17:54:50 UTC
Created attachment 1133881 [details]
exception backtrace portion in the foreman deployment.log

Description of problem:
 Intermittently, a 'NameError: uninitialized constant Katello::Repository::Katello::RepositoryErratum' exception occurs in the content syncing step during a RHCI deployment.

Version-Release number of selected component (if applicable):
N/A

How reproducible:
Intermittent

Steps to Reproduce:
1. Create a RHCI deployment of RHEV, this means syncing ~10 repos for RHEL7 and RHEV
2. Begin the deployment
3. Deployment fails

Actual results:
Exception occurs, syncing step fails

Action:
Actions::Katello::Repository::Sync

Input:
{"repository"=>
  {"id"=>6,
   "name"=>
    "Red Hat Enterprise Virtualization Manager 3 Beta RPMs x86_64 6Server",
   "label"=>
    "Red_Hat_Enterprise_Virtualization_Manager_3_Beta_RPMs_x86_64_6Server"},
 "product"=>
  {"id"=>2,
   "name"=>"Red Hat Enterprise Virtualization",
   "label"=>"Red_Hat_Enterprise_Virtualization",
   "cp_id"=>"150"},
 "provider"=>{"id"=>2, "name"=>"Red Hat"},
 "organization"=>
  {"id"=>1, "name"=>"Default Organization", "label"=>"Default_Organization"},
 "services_checked"=>["pulp", "pulp_auth"]}

Backtrace:
2016-03-07 15:55:28 [E] uninitialized constant Katello::Repository::Katello::RepositoryErratum (NameError)
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/inheritance.rb:111:in `compute_type'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/reflection.rb:172:in `klass'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/associations/association.rb:118:in `klass'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/associations/association.rb:124:in `target_scope'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/associations/association.rb:88:in `scoped'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/associations/collection_proxy.rb:66:in `scoped'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/associations/collection_proxy.rb:41:in `order'
/mnt/sandbox/git2/katello/app/lib/actions/katello/repository/errata_mail.rb:20:in `plan'
/mnt/sandbox/git2/dynflow/lib/dynflow/action.rb:442:in `block (3 levels) in execute_plan'
/mnt/sandbox/git2/dynflow/lib/dynflow/middleware/stack.rb:26:in `call'
/mnt/sandbox/git2/dynflow/lib/dynflow/middleware/stack.rb:26:in `pass'
/mnt/sandbox/git2/dynflow/lib/dynflow/middleware.rb:16:in `pass'
/mnt/sandbox/git2/dynflow/lib/dynflow/middleware.rb:29:in `plan'
/mnt/sandbox/git2/dynflow/lib/dynflow/middleware/stack.rb:22:in `call'
/mnt/sandbox/git2/dynflow/lib/dynflow/middleware/stack.rb:26:in `pass'
/mnt/sandbox/git2/dynflow/lib/dynflow/middleware.rb:16:in `pass'
/mnt/sandbox/git2/dynflow/lib/dynflow/middleware.rb:29:in `plan'
/mnt/sandbox/git2/dynflow/lib/dynflow/middleware/stack.rb:22:in `call'

Expected results:
Successful content sync

Additional info:
Backtrace is attached.

Comment 2 John Matthews 2016-03-07 17:58:02 UTC
We also saw the below which may be related:
  [E] uninitialized constant Katello::Erratum::Katello::ErratumCve (NameError)





2016-03-05 23:13:57 [D] [1m[35mSQL (0.4ms)[0m SELECT "katello_erratum_bugzillas"."bug_id" FROM "katello_erratum_bugzillas" WHERE "katello_erratum_bugzillas"."erratum_id" = 1
2016-03-05 23:13:58 [E] uninitialized constant Katello::Erratum::Katello::ErratumCve (NameError)
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/inheritance.rb:111:in compute_type' /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/reflection.rb:172:inklass'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/reflection.rb:284:in inverse_of' /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/reflection.rb:245:incheck_validity_of_inverse!'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/reflection.rb:240:in check_validity!' /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/associations/association.rb:26:ininitialize'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/associations/collection_association.rb:24:in initialize' /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/associations.rb:160:innew'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/associations.rb:160:in association' /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/associations/builder/association.rb:44:inblock in define_readers'
/mnt/sandbox/git2/katello/app/models/katello/erratum.rb:138:in block in update_cves' /mnt/sandbox/git2/katello/app/models/katello/erratum.rb:111:incall'
/mnt/sandbox/git2/katello/app/models/katello/erratum.rb:111:in run_until' /mnt/sandbox/git2/katello/app/models/katello/erratum.rb:144:inupdate_cves'
/mnt/sandbox/git2/katello/app/models/katello/erratum.rb:95:in update_from_json' /mnt/sandbox/git2/katello/app/models/katello/glue/pulp/repo.rb:333:inblock in index_db_errata'
/mnt/sandbox/git2/katello/app/models/katello/glue/pulp/repo.rb:327:in each' /mnt/sandbox/git2/katello/app/models/katello/glue/pulp/repo.rb:327:inindex_db_errata'
/mnt/sandbox/git2/katello/app/models/katello/glue/elastic_search/repository.rb:129:in index_content' /mnt/sandbox/git2/katello/app/lib/actions/katello/repository/index_content.rb:16:inrun'
/mnt/sandbox/git2/dynflow/lib/dynflow/action.rb:487:in `block (3 levels) in execute_run'

Comment 3 Bryan Kearney 2016-07-26 19:02:11 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 4 Bryan Kearney 2017-01-12 19:39:55 UTC
Are you still seeing this?

Comment 5 John Matthews 2017-01-13 20:06:56 UTC
We have not seen this issue in several months.

I am marking this CLOSED

For more info, I suspect this issue was only showing up in development environments, don't think it happened from a pure RPM install.