Actions
Bug #29
closedTimeWithZone with String failed
Description
Getting the below on the second run of the script with a new host. Changing /var/www/html/foreman/app/models/host.rb:177
--- if last_compile.nil? or (last_compile + 1.minute < facts.values[:_timestamp])
+++ if last_compile.nil? or ((last_compile + 1.minute).to_s < facts.values[:_timestamp])
Fixes the issue.
- rake puppet:import:hosts_and_facts RAILS_ENV=production --trace
(in /var/www/html/foreman)- Invoke puppet:import:hosts_and_facts (first_time)
- Invoke environment (first_time)
- Execute environment
- Execute puppet:import:hosts_and_facts
Importing from /var/lib/puppet/yaml/facts
Importing localhost
Tue Sep 22 17:23:01 +0100 2009
rake aborted!
comparison of ActiveSupport::TimeWithZone with String failed
/var/www/html/foreman/app/models/host.rb:178:in `<'
/var/www/html/foreman/app/models/host.rb:178:in `importFacts'
/var/www/html/foreman/app/models/host.rb:167:in `importHostAndFacts'
/var/www/html/foreman/lib/tasks/puppet.rake:34
/var/www/html/foreman/lib/tasks/puppet.rake:31:in `each'
/var/www/html/foreman/lib/tasks/puppet.rake:31
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:238:in `synchronize'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
Actions