Project

General

Profile

Bug #24900

foreman-rake reports:expire fails to run

Added by Joseph Boyer about 1 year ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Category:
Puppet Reports
Target version:
-
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

command:
/usr/sbin/foreman-rake reports:expire days=7 --trace

output:
/usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP
/usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here
/usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here
  • Invoke reports:expire (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute reports:expire
    rake aborted!
    TypeError: can't convert NilClass into time interval
    /usr/share/foreman/app/models/report.rb:99:in `sleep'
    /usr/share/foreman/app/models/report.rb:99:in `block in expire'
    /usr/share/foreman/app/models/report.rb:82:in `loop'
    /usr/share/foreman/app/models/report.rb:82:in `expire'
    /usr/share/foreman/lib/tasks/reports.rake:39:in `block (3 levels) in <top (required)>'
    /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:100:in `as'
    /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:106:in `as_anonymous_admin'
    /usr/share/foreman/lib/tasks/reports.rake:38:in `block (2 levels) in <top (required)>'
    /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
    /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
    /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
    /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
    /opt/rh/rh-ruby24/root/usr/share/ruby/monitor.rb:214:in `mon_synchronize'
    /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
    /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
    /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:152:in `invoke_task'
    /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
    /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:108:in `each'
    /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:108:in `block in top_level'
    /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads'
    /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level'
    /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:80:in `block in run'
    /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
    /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
    /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
    /opt/rh/rh-ruby24/root/usr/bin/rake:23:in `load'
    /opt/rh/rh-ruby24/root/usr/bin/rake:23:in `<main>'
    Tasks: TOP => reports:expire

Related issues

Related to Foreman - Bug #23623: Break report expiration into batchesClosed2018-05-17

Associated revisions

Revision 15c153ba (diff)
Added by Lukas Zapletal 10 months ago

Fixes #24900 - expiration task no longer error out

History

#1 Updated by Tomer Brisker about 1 year ago

  • Related to Bug #23623: Break report expiration into batches added

#2 Updated by Tomer Brisker about 1 year ago

  • Target version set to 1.19.1

#3 Updated by Lukas Zapletal 12 months ago

  • Triaged changed from No to Yes

Reproduced.

#4 Updated by The Foreman Bot 12 months ago

  • Assignee set to Lukas Zapletal
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6090 added

#5 Updated by Tomer Brisker 10 months ago

  • Target version changed from 1.19.1 to 961

1.19.1 release is in progress and this was not fixed in time, pushing out to 1.19.2.

#6 Updated by Tomer Brisker 10 months ago

  • Fixed in Releases 1.20.1, 1.21.0 added

#7 Updated by Lukas Zapletal 10 months ago

  • Status changed from Ready For Testing to Closed

#8 Updated by Tomer Brisker 8 months ago

  • Fixed in Releases deleted ()

With 1.21 due soon, there will likely not be a 1.19.2 release. Removing.

#9 Updated by Tomer Brisker 8 months ago

  • Target version deleted (961)

Also available in: Atom PDF