Actions
Bug #13944
closedforeman-rake fix_cached_counters fails.
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Rake tasks
Target version:
-
Description
Foreman-debug output:
HOSTNAME: olympic.it.liu.se
OS: redhat
RELEASE: CentOS release 6.7 (Final)
FOREMAN: 1.10.2
RUBY: ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
PUPPET: 3.8.6
DENIALS: 0
Expected result:
foreman-rake fix_cached_counters works its way through the foreman database and cleans up the statistics.
Actual result:
[root@olympic ~]# foreman-rake fix_cached_counters -t- Invoke fix_cached_counters (first_time)
- Invoke environment (first_time)
- Execute environment
- Execute fix_cached_counters
Correcting cached counters: (this may take a few minutes)
Architecture corrected
Environment corrected
Operatingsystem corrected
rake aborted!
undefined method `counter_cache_column' for nil:NilClass
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/counter_cache.rb:32:in `block in reset_counters'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/counter_cache.rb:19:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/counter_cache.rb:19:in `reset_counters'
/usr/share/foreman/lib/tasks/fix_cached_counters.rake:5:in `block (3 levels) in <top (required)>'
/usr/share/foreman/lib/tasks/fix_cached_counters.rake:5:in `each'
/usr/share/foreman/lib/tasks/fix_cached_counters.rake:5:in `block (2 levels) in <top (required)>'
/usr/share/foreman/lib/tasks/fix_cached_counters.rake:4:in `each'
/usr/share/foreman/lib/tasks/fix_cached_counters.rake:4:in `block 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 => fix_cached_counters
[root@olympic ~]#
Files
Updated by Dominic Cleal almost 9 years ago
- Is duplicate of Bug #11444: Domains page shows negative number of hosts added
Updated by Dominic Cleal almost 9 years ago
Thanks for the bug report. This has been fixed in Foreman 1.11 (release candidates now available), but you can always workaround it for now by removing "Domain" from /usr/share/foreman/lib/tasks/fix_cached_counters.rake in the meantime.
Updated by Dominic Cleal almost 9 years ago
- Status changed from New to Duplicate
Actions