Bug 2024986

Summary: CV publish fails with: No route matches {:action=>"show", :controller=>"foreman_tasks/tasks", :id=>nil}, missing required keys: [:id] (ActionController::UrlGenerationError)
Product: Red Hat Satellite Reporter: Jan Senkyrik <jsenkyri>
Component: Satellite MaintainAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: ahumbe, apatel, aruzicka, aupadhye, ehelms, gtalreja, jsherril, kgaikwad, ktordeur, ldelouw, rtweed
Target Milestone: 6.11.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-1.0.6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2059380 (view as bug list) Environment:
Last Closed: 2022-07-05 14:30:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Senkyrik 2021-11-19 16:19:19 UTC
Description of problem:

Content View publish task fails with the following error:
~~~
No route matches {:action=>"show", :controller=>"foreman_tasks/tasks", :id=>nil}, missing required keys: [:id] (ActionController::UrlGenerationError)
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:248:in `raise_generation_error'
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:218:in `block in optimized_helper'
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:233:in `block in parameterize_args'
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:230:in `times'
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:230:in `parameterize_args'
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:217:in `optimized_helper'
/opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:198:in `call'
/usr/share/foreman/config/initializers/routing_hash_for.rb:11:in `block (2 levels) in define_url_helper'
...
...
~~~


Version-Release number of selected component (if applicable):
Satellite 6.10.1
pulp3


How reproducible:
N/A


Additional info:

The traceback seems identical to:

https://community.theforeman.org/t/trying-to-synchronize-one-of-my-repos-results-in-the-error-actioncontroller-no-route-matches-action-show-controller-foreman-tasks-tasks-id-nil-missing-required-keys-id/24655

https://community.theforeman.org/t/content-view-publish-no-route-matches-error/24650

https://community.theforeman.org/t/no-route-matches-action-show-controller-foreman-tasks-tasks-id-nil-missing-required-keys-id/23905

Comment 5 Justin Sherrill 2021-11-29 15:09:21 UTC
do we know what 'foreman-rake cleanup script' was run?

Comment 7 Jan Senkyrik 2021-11-29 15:25:10 UTC
There was a stuck CV publish task in a paused state due to Bug 2013320.

We executed this to get rid of it:

# foreman-rake foreman_tasks:cleanup TASK_SEARCH='label ~ *' VERBOSE=true STATES='paused'

Comment 12 Adam Ruzicka 2021-12-07 14:28:30 UTC
Created redmine issue https://projects.theforeman.org/issues/34101 from this bug

Comment 13 Bryan Kearney 2021-12-13 04:05:33 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34101 has been resolved.

Comment 14 Adam Ruzicka 2022-04-04 08:48:20 UTC
Guess we can flip this over to modified.

Comment 15 Peter Ondrejka 2022-04-07 11:45:16 UTC
Verified on Satellite 6.11 sn 15, satellite-maintain health check now deletes paused tasks as expected and CV publish tasks can be successfully triggered afterwards.

Comment 18 errata-xmlrpc 2022-07-05 14:30:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.11 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5498