Project

General

Profile

Bug #10637

Reindex fails

Added by Nicolas Michel over 6 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

It seems the DB are corrupted.

foreman-rake katello:reindex --trace
** Invoke katello:reindex (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke katello:reset_backends:elasticsearch (first_time)
** Invoke environment 
** Execute katello:reset_backends:elasticsearch
Elasticsearch Indices cleared.
** Execute katello:reindex
Re-indexing Katello::HostCollection
Re-indexing Katello::System
rake aborted!
Expect initializer to return hash if a group of attributes is defined by lazy_accessor
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0/app/lib/katello/lazy_accessor.rb:177:in `run_initializer'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0/app/lib/katello/lazy_accessor.rb:154:in `lazy_attribute_get'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0/app/lib/katello/lazy_accessor.rb:74:in `block (2 levels) in lazy_accessor'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0/app/models/katello/glue/candlepin/consumer.rb:86:in `serializable_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/tire-0.6.2/lib/tire/model/search.rb:290:in `to_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/tire-0.6.2/lib/tire/index.rb:195:in `block in bulk'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `map'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `map'
/opt/rh/ruby193/root/usr/share/gems/gems/tire-0.6.2/lib/tire/index.rb:176:in `bulk'
/opt/rh/ruby193/root/usr/share/gems/gems/tire-0.6.2/lib/tire/index.rb:273:in `bulk_store'
/opt/rh/ruby193/root/usr/share/gems/gems/tire-0.6.2/lib/tire/index.rb:300:in `import'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0/lib/katello/tasks/reindex.rake:19:in `block (3 levels) in <top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0/lib/katello/tasks/reindex.rake:7:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0/lib/katello/tasks/reindex.rake:7:in `block (2 levels) in <top (required)>'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in `invoke_task'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block (2 levels) in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in `top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in `block in run'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in `run'
/opt/rh/ruby193/root/usr/bin/rake:32:in `<main>'
Tasks: TOP => katello:reindex

Related issues

Related to Katello - Feature #10724: Need a better rake katello:reindex Closed2015-06-05

History

#1 Updated by Nicolas Michel over 6 years ago

Then I tried a clean_backend_object:

foreman-rake katello:clean_backend_objects
System 93 xxxxxxxxx  is partially missing.  Cleaning.
System 94 xxxxxxxxx  is partially missing.  Cleaning.

Then a new reindex:

foreman-rake katello:reindex --trace
** Invoke katello:reindex (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke katello:reset_backends:elasticsearch (first_time)
** Invoke environment 
** Execute katello:reset_backends:elasticsearch
Elasticsearch Indices cleared.
** Execute katello:reindex
Re-indexing Katello::HostCollection
Re-indexing Katello::System
Re-indexing Katello::Product
Re-indexing Katello::Repository
Re-indexing Katello::ContentView
Re-indexing Katello::TaskStatus
Re-indexing Katello::Job
Re-indexing Katello::ActivationKey
Re-indexing Katello::ContentViewErratumFilterRule
Re-indexing Katello::ContentViewPuppetModule
Re-indexing Katello::ContentViewPackageGroupFilterRule
Re-indexing Katello::ContentViewPackageFilterRule
Re-indexing Katello::Notice
Re-indexing Katello::ContentViewFilter
Re-indexing Katello::Provider
Re-indexing Katello::ContentViewPuppetEnvironment
rake aborted!
undefined method `merge' for nil:NilClass
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0/app/models/katello/glue/pulp/repo.rb:91:in `to_hash'
/opt/rh/ruby193/root/usr/share/gems/gems/tire-0.6.2/lib/tire/index.rb:195:in `block in bulk'
/opt/rh/ruby193/root/usr/share/gems/gems/tire-0.6.2/lib/tire/index.rb:176:in `map'
/opt/rh/ruby193/root/usr/share/gems/gems/tire-0.6.2/lib/tire/index.rb:176:in `bulk'
/opt/rh/ruby193/root/usr/share/gems/gems/tire-0.6.2/lib/tire/index.rb:273:in `bulk_store'
/opt/rh/ruby193/root/usr/share/gems/gems/tire-0.6.2/lib/tire/index.rb:300:in `import'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0/lib/katello/tasks/reindex.rake:19:in `block (3 levels) in <top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0/lib/katello/tasks/reindex.rake:7:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.0/lib/katello/tasks/reindex.rake:7:in `block (2 levels) in <top (required)>'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in `invoke_task'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block (2 levels) in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in `top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in `block in run'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in `run'
/opt/rh/ruby193/root/usr/bin/rake:32:in `<main>'
Tasks: TOP => katello:reindex

#2 Updated by Eric Helms over 6 years ago

  • Triaged changed from No to Yes
  • Legacy Backlogs Release (now unused) set to 55

#3 Updated by Eric Helms over 6 years ago

  • Legacy Backlogs Release (now unused) changed from 55 to 61

#4 Updated by Eric Helms about 6 years ago

  • Legacy Backlogs Release (now unused) changed from 61 to 31

#5 Updated by Eric Helms about 6 years ago

  • Status changed from New to Resolved

#6 Updated by Eric Helms about 6 years ago

Also available in: Atom PDF