Task Cleanup broken after Upgrade from 1.22/3.12 to 2.0/3.15

Problem:
Since I updated our dev environment from 1.22/Katello 3.12 to 2.0/3.15 this week, Foreman-Tasks Cleanup rake job seems borked.
After the upgrade, I encountered some broken “Pulp Disk Space Notification Tasks” beeing stuck at “running/100%/warning”. Since all of them were during the maintenance window (which had some trouble due to self-registred Katello beeing a pain to upgrade sometimes), and the error message complained about not beeing able to connect to Foreman Instance, I assumed they were planned tasks broken during the upgrade window.
Since those tasks can not be cancled, I went on and tried to get rid of them via foreman-rake task cleanup as described by the tasks plugin.
This resulted in the following stacktrace:

# foreman-rake foreman_tasks:cleanup TASK_SEARCH='label=CreatePulpDiskSpaceNotifications' STATES=running --trace
Rubocop not loaded.
Rubocop not loaded.
** Invoke foreman_tasks:cleanup (first_time)
** Invoke foreman_tasks:cleanup:run (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute foreman_tasks:cleanup:run
rake aborted!
The Dynflow world was not initialized yet. If your plugin uses it, make sure to call Rails.application.dynflow.require! in some initializer
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.3/lib/dynflow/rails.rb:75:in `world'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-1.1.1/lib/foreman_tasks/cleaner.rb:80:in `initialize'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-1.1.1/lib/foreman_tasks/cleaner.rb:8:in `new'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-1.1.1/lib/foreman_tasks/cleaner.rb:8:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-1.1.1/lib/foreman_tasks/tasks/cleanup.rake:37:in `block (3 levels) in <top (required)>'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:251:in `block in execute'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:251:in `each'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:251:in `execute'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:195:in `block in invoke_with_call_chain'
/opt/rh/rh-ruby25/root/usr/share/ruby/monitor.rb:226:in `mon_synchronize'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:217:in `block in invoke_prerequisites'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:215:in `each'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:215:in `invoke_prerequisites'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
/opt/rh/rh-ruby25/root/usr/share/ruby/monitor.rb:226:in `mon_synchronize'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:181:in `invoke'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:160:in `invoke_task'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:116:in `each'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:116:in `block in top_level'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:125:in `run_with_threads'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:110:in `top_level'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:83:in `block in run'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:80:in `run'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
/opt/rh/rh-ruby25/root/usr/bin/rake:23:in `load'
/opt/rh/rh-ruby25/root/usr/bin/rake:23:in `<main>'
Tasks: TOP => foreman_tasks:cleanup => foreman_tasks:cleanup:run

I am unsure what Dynflow world would be uninitialized, though. Dynflow is up and running and all tasks since the upgrade seem to be working fine.
I also went ahead and checked/validated the Dynflow wolds via the “/worlds” page, but with no success on this matter.

Expected outcome:
Task cleanup should work as expected.

Foreman and Proxy versions:
2.0.1

Foreman and Proxy plugin versions:

foreman-tasks 	The goal of this plugin is to unify the way of showing task statuses across the Foreman instance. It defines Task model for keeping the information about the tasks and Lock for assigning the tasks to resources. The locking allows dealing with preventing multiple colliding tasks to be run on the same resource. It also optionally provides Dynflow infrastructure for using it for managing the tasks. 	Ivan Nečas 	1.1.1
foreman_bootdisk 	Plugin for Foreman that creates iPXE-based boot disks to provision hosts without the need for PXE infrastructure. 	Dominic Cleal 	16.0.0
foreman_discovery 	MaaS Discovery Plugin engine for Foreman 	Aditi Puntambekar, alongoldboim, Alon Goldboim, amirfefer, Amit Karsale, Amos Benari, Avi Sharvit, Bryan Kearney, bshuster, Daniel Lobato, Daniel Lobato Garcia, Daniel Lobato García, Danny Smit, David Davis, Djebran Lezzoum, Dominic Cleal, Eric D. Helms, Ewoud Kohl van Wijngaarden, Frank Wall, Greg Sutcliffe, ChairmanTubeAmp, Ido Kanner, imriz, Imri Zvik, Ivan Nečas, Joseph Mitchell Magen, June Zhang, kgaikwad, Lars Berntzon, ldjebran, Lukas Zapletal, Lukáš Zapletal, Marek Hulan, Marek Hulán, Martin Bačovský, Matt Jarvis, Michael Moll, Nick, odovzhenko, Ohad Levy, Ondrej Prazak, Ondřej Ezr, Ori Rabin, orrabin, Partha Aji, Petr Chalupa, Phirince Philip, Rahul Bajaj, Robert Antoni Buj Gelonch, Scubafloyd, Sean O\'Keeffe, Sebastian Gräßl, Shimon Shtein, Shlomi Zadok, Stephen Benjamin, Swapnil Abnave, Thomas Gelf, Timo Goebel, Tomas Strych, Tom Caspy, Tomer Brisker, and Yann Cézard 	16.0.1
foreman_hooks 	Plugin engine for Foreman that enables running custom hook scripts on Foreman events 	Dominic Cleal 	0.3.16
foreman_remote_execution 	A plugin bringing remote execution to the Foreman, completing the config management functionality with remote management functionality. 	Foreman Remote Execution team 	3.2.2
foreman_scc_manager 	Foreman plugin to sync SUSE Customer Center products and repositories into Katello. 	ATIX AG 	1.8.3
foreman_snapshot_management 	Foreman-plugin to manage snapshots in a virtual-hardware environments. 	ATIX AG 	1.7.1
foreman_templates 	Engine to synchronise provisioning templates from GitHub 	Greg Sutcliffe 	8.0.0
katello 	Katello adds Content and Subscription Management to Foreman. For this it relies on Candlepin and Pulp. 	N/A 	3.15.2

Distribution and version:
RHEL 7

This was tracked as issue 30145, for 2.0 it is already resolved in foreman-tasks-1.1.2. Now we’re just waiting until it goes through packaging and lands in the repos.

1 Like

Thanks for the heads up!
I downloaded the Patchfile for the tasks 1.1.X release and applied it manually, that fixed the problem :slight_smile:
Hope this makes it into packaging before we push for the updates in testing and production environment :slight_smile:

Adam,

Could this fix be pushed to the EL8 (and I guess EL7) version 2.1 repositories?
As I’m seeing the same problem on 2.1.0 (@foreman-plugins for 2.1 has 2.0.1-1.fm2_1.el8)

Many Thanks in Advance,
Peter

Packaging PR bringing foreman-tasks 2.0.2 containing the fix for this into 2.1 repos was merged roughly an hour ago. It will take a while until the package trickles down to the repositories, but it is coming. Please hang in there :slight_smile:

3 Likes

Adam,
Did the the 2.1/EL8 release train get derailed?
Regards,
Peter
PS: Today I saw a bootdisk update, but nothing for tasks

1 Like

Sigh, looks like I read the notification from github wrong, so the packaging PR I mentioned previously was for develop. Here’s the right one https://github.com/theforeman/foreman-packaging/pull/5554, sorry about the delay

1 Like

It is in the repos now

2 Likes

Already tasks a few hours ago, the foretask the cronjob executes works no problems on EL8 2.1.0 :slight_smile:

2 Likes

Hello,
Could you tell me if the fix is planned for Ubuntu 18.04 repos ?
Thanks

Hello,
I specify my previous message. I speak about Debian package (deb http://deb.theforeman.org/ bionic 2.1
/ deb http://deb.theforeman.org/ plugins 2.1) .
On this repo last version released for foreman-tasks is: 2.0.0-1

PR bringing 2.0.2 into deb/2.1 was merged into the packaging repo almost two weeks ago, but it looks like the build failed.

@tbrisker could we kick off this build again? I assume the failure was transient

I triggered it again at https://ci.theforeman.org/job/packaging_build_deb_plugin/514/, i hope it is indeed a transient issue and not something more significant.

Thanks, I upgraded foreman-task and now I can launch foreman-rake foreman_tasks:cleanup successfully.

But on Webui I have still this issue on foreman_tasks/tasks page:

 Can't find entry point 'foreman-tasks' in webpack manifest

*ActionView::Template::Error*
**Can't find entry point 'foreman-tasks' in webpack manifest**
/usr/share/foreman/vendor/ruby/2.5.0/gems/webpack-rails-0.9.11/lib/webpack/rails/manifest.rb:39:in `asset_paths'
/usr/share/foreman/vendor/ruby/2.5.0/gems/webpack-rails-0.9.11/lib/webpack/rails/helper.rb:18:in `webpack_asset_paths'
/usr/share/foreman/app/helpers/reactjs_helper.rb:43:in `block in js_tags_for'
/usr/share/foreman/app/helpers/reactjs_helper.rb:42:in `map'
/usr/share/foreman/app/helpers/reactjs_helper.rb:42:in `js_tags_for'
/usr/share/foreman/app/helpers/reactjs_helper.rb:20:in `webpacked_plugins_js_for'
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman-tasks-2.0.2/app/views/foreman_tasks/layouts/react.html.erb:2:in `block in _3c2b85e87390e9564a737b725112d4d8'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/helpers/capture_helper.rb:45:in `block in capture'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/helpers/capture_helper.rb:209:in `with_output_buffer'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/helpers/capture_helper.rb:45:in `capture'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/helpers/capture_helper.rb:159:in `content_for'
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman-tasks-2.0.2/app/views/foreman_tasks/layouts/react.html.erb:1:in `_3c2b85e87390e9564a737b725112d4d8'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/base.rb:274:in `_run'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/template.rb:185:in `block in render'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:182:in `instrument'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/template.rb:385:in `instrument_render_template'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/template.rb:183:in `render'
/usr/share/foreman/vendor/ruby/2.5.0/gems/deface-1.5.3/lib/deface/action_view_extensions.rb:43:in `render'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/renderer/template_renderer.rb:58:in `block (2 levels) in render_template'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/renderer/abstract_renderer.rb:88:in `block in instrument'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:180:in `block in instrument'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:180:in `instrument'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/renderer/abstract_renderer.rb:87:in `instrument'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/renderer/template_renderer.rb:57:in `block in render_template'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/renderer/template_renderer.rb:65:in `render_with_layout'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/renderer/template_renderer.rb:56:in `render_template'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/renderer/template_renderer.rb:13:in `render'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/renderer/renderer.rb:29:in `render_to_object'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/rendering.rb:117:in `block in _render_template'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/base.rb:304:in `in_rendering_context'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/rendering.rb:116:in `_render_template'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/streaming.rb:218:in `_render_template'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/rendering.rb:103:in `render_to_body'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/rendering.rb:52:in `render_to_body'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/renderers.rb:142:in `render_to_body'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/abstract_controller/rendering.rb:25:in `render'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/rendering.rb:36:in `render'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/core_ext/benchmark.rb:14:in `block in ms'
/usr/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/core_ext/benchmark.rb:14:in `ms'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:44:in `block in render'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.2/lib/active_record/railties/controller_runtime.rb:34:in `cleanup_view_runtime'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:43:in `render'
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman-tasks-2.0.2/app/controllers/foreman_tasks/react_controller.rb:4:in `index'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/abstract_controller/base.rb:195:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/rendering.rb:30:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:112:in `block in run_callbacks'
/usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in `around'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in `around'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:139:in `run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/abstract_controller/callbacks.rb:41:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/rescue.rb:22:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:180:in `block in instrument'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:180:in `instrument'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activerecord-6.0.3.2/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/abstract_controller/base.rb:136:in `process'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionview-6.0.3.2/lib/action_view/rendering.rb:39:in `process'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_controller/metal.rb:190:in `dispatch'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_controller/metal.rb:254:in `dispatch'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/routing/route_set.rb:33:in `serve'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/journey/router.rb:49:in `block in serve'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/journey/router.rb:32:in `each'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/journey/router.rb:32:in `serve'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/routing/route_set.rb:834:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-dsl-2.2.7/lib/apipie_dsl/static_dispatcher.rb:67:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.18/lib/apipie/static_dispatcher.rb:66:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.18/lib/apipie/extractor/recorder.rb:137:in `call'
/usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/apipie-rails-0.5.18/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
/usr/share/foreman/lib/foreman/middleware/catch_json_parse_errors.rb:9:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/conditional_get.rb:27:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
/usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/cookies.rb:648:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:101:in `run_callbacks'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.2/lib/rails/rack/logger.rb:37:in `call_app'
/usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.2/lib/rails/rack/logger.rb:28:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'
/usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/executor.rb:14:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/static.rb:126:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/actionpack-6.0.3.2/lib/action_dispatch/middleware/host_authorization.rb:76:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/secure_headers-6.3.1/lib/secure_headers/middleware.rb:11:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.2/lib/rails/engine.rb:527:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.2/lib/rails/railtie.rb:190:in `public_send'
/usr/share/foreman/vendor/ruby/2.5.0/gems/railties-6.0.3.2/lib/rails/railtie.rb:190:in `method_missing'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/urlmap.rb:74:in `block in call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `each'
/usr/share/foreman/vendor/ruby/2.5.0/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.5/lib/puma/configuration.rb:228:in `call'
/usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.5/lib/puma/server.rb:713:in `handle_request'
/usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.5/lib/puma/server.rb:472:in `process_client'
/usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.5/lib/puma/server.rb:328:in `block in run'
/usr/share/foreman/vendor/ruby/2.5.0/gems/puma-4.3.5/lib/puma/thread_pool.rb:134:in `block in spawn_thread'
/usr/share/foreman/vendor/ruby/2.5.0/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'

I upgraded foreman from 1.24 to 2.0 then 2.1 and I haven’t this issue in 1.24.

ii foreman 2.1.0-1
ii foreman-assets 2.1.0-1
ii foreman-dynflow-sidekiq 2.1.0-1
ii foreman-libvirt 2.1.0-1
ii foreman-openstack 2.1.0-1
ii foreman-postgresql 2.1.0-1
ii foreman-service 2.1.0-1
ii foreman-vmware 2.1.0-1
ii ruby-foreman-ansible 5.1.1-1
ii ruby-foreman-deface 1.5.3-1
ii ruby-foreman-default-hostgroup 5.0.0-1
ii ruby-foreman-discovery 16.1.0-1
ii ruby-foreman-remote-execution 3.3.4-1
ii ruby-foreman-setup 6.0.0-1
ii ruby-foreman-tasks 2.0.2-1

Moreover,
This page the page job_invocations works but when I select a job in “running 100%” status
I have this issue:

Can’t find entry point ‘foreman_remote_execution’ in webpack manifest

And for a job “queue” status:

undefined method `input’ for nil:NilClass

Could you confirm you have all the files it is trying to find in the right places?

They should be in /var/lib/foreman/webpack/foreman-tasks and the important ones are manifest.json and foreman-tasks-cfcbdd3bca24738fa8e3.js

I have all theses files in /var/lib/foreman/public/webpack/foreman-tasks/ :
but webpack is in “public” subfolder of /var/lib/foreman

[PROD] root -> ls -al /var/lib/foreman/public/webpack/foreman-tasks/
total 10528
drwxr-xr-x 2 foreman foreman    4096 Jul 29 14:53 .
drwxr-xr-x 7 foreman foreman    4096 Jul 29 09:33 ..
-rw-r--r-- 1 foreman foreman  127217 Jul  9 15:03 bundle-9138a13701882116d975.css
-rw-r--r-- 1 foreman foreman    9829 Jul  9 15:03 bundle-9138a13701882116d975.css.gz
-rw-r--r-- 1 foreman foreman     122 Jul  9 15:03 bundle-9138a13701882116d975.css.map
-rw-r--r-- 1 foreman foreman 1148565 Jul  9 15:03 bundle-9138a13701882116d975.js
-rw-r--r-- 1 foreman foreman  151763 Jul  9 15:03 bundle-9138a13701882116d975.js.gz
-rw-r--r-- 1 foreman foreman 1733930 Jul  9 15:03 bundle-9138a13701882116d975.js.map
-rw-r--r-- 1 foreman foreman  307578 Jul  9 15:03 bundle-9138a13701882116d975.js.map.gz
-rw-r--r-- 1 foreman foreman  149511 Jul  9 15:03 foreman-tasks-cfcbdd3bca24738fa8e3.css
-rw-r--r-- 1 foreman foreman   10195 Jul  9 15:03 foreman-tasks-cfcbdd3bca24738fa8e3.css.gz
-rw-r--r-- 1 foreman foreman     129 Jul  9 15:03 foreman-tasks-cfcbdd3bca24738fa8e3.css.map
-rw-r--r-- 1 foreman foreman 1750853 Jul  9 15:03 foreman-tasks-cfcbdd3bca24738fa8e3.js
-rw-r--r-- 1 foreman foreman  304127 Jul  9 15:03 foreman-tasks-cfcbdd3bca24738fa8e3.js.gz
-rw-r--r-- 1 foreman foreman 3618094 Jul  9 15:03 foreman-tasks-cfcbdd3bca24738fa8e3.js.map
-rw-r--r-- 1 foreman foreman  732332 Jul  9 15:03 foreman-tasks-cfcbdd3bca24738fa8e3.js.map.gz
-rw-r--r-- 1 foreman foreman    1062 Jul  9 15:03 manifest.json
-rw-r--r-- 1 foreman foreman     283 Jul  9 15:03 manifest.json.gz
-rw-r--r-- 1 foreman foreman   92325 Jul  9 15:03 vendor-75607e7cfb247ea912f9.js
-rw-r--r-- 1 foreman foreman   27172 Jul  9 15:03 vendor-75607e7cfb247ea912f9.js.gz
-rw-r--r-- 1 foreman foreman  446833 Jul  9 15:03 vendor-75607e7cfb247ea912f9.js.map
-rw-r--r-- 1 foreman foreman  103356 Jul  9 15:03 vendor-75607e7cfb247ea912f9.js.map.gz

That sounds good, have you restarted the services after updating the packages?

Yes I restarted foreman (with systemctl restart foreman)
I restarted again one minute ago and same behavior

● foreman.service - Foreman
   Loaded: loaded (/lib/systemd/system/foreman.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/foreman.service.d
           └─ansible-installer.conf
   Active: active (running) since Thu 2020-07-30 09:20:36 CEST; 3min 38s ago
     Docs: https://theforeman.org
 Main PID: 18696 (foreman-ruby)
    Tasks: 32 (limit: 4915)
   CGroup: /system.slice/foreman.service
           ├─18696 puma 4.3.5 (tcp://0.0.0.0:3000) [foreman]
           ├─18739 puma: cluster worker 0: 18696 [foreman]
           └─18741 puma: cluster worker 1: 18696 [foreman]

Jul 30 09:20:53 *****-01 foreman[18696]: [18696] Puma starting in cluster mode...
Jul 30 09:20:53 *****-01 foreman[18696]: [18696] * Version 4.3.5 (ruby 2.5.1-p57), codename: Mysterious Traveller
Jul 30 09:20:53 *****-01 foreman[18696]: [18696] * Min threads: 0, max threads: 16
Jul 30 09:20:53 *****-01 foreman[18696]: [18696] * Environment: production
Jul 30 09:20:53 *****-01 foreman[18696]: [18696] * Process workers: 2
Jul 30 09:20:53 *****-01 foreman[18696]: [18696] * Preloading application
Jul 30 09:20:53 *****-01 foreman[18696]: [18696] * Activated tcp://0.0.0.0:3000
Jul 30 09:20:53 *****-01 foreman[18696]: [18696] Use Ctrl-C to stop
Jul 30 09:20:53 *****-01 foreman[18696]: [18696] - Worker 1 (pid: 18741) booted, phase: 0
Jul 30 09:20:53 *****-01 foreman[18696]: [18696] - Worker 0 (pid: 18739) booted, phase: 0

Have you tried “sudo foreman-maintain service restart” to restart the related services (like smart_proxy_dynflow_core.service, …)?