Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1343617 - The dynflow on Satellite 6 fails to load with error 'undefined method `action_class' for nil:NilClass
Summary: The dynflow on Satellite 6 fails to load with error 'undefined method `action...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Tasks Plugin
Version: 6.1.8
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks: 1479962
TreeView+ depends on / blocked
 
Reported: 2016-06-07 14:29 UTC by Chris Roberts
Modified: 2021-06-10 11:21 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20002 0 Normal Closed ISE on /foreman_tasks/dynflow/ when some invalid plans are in place 2021-02-18 14:56:31 UTC
Red Hat Knowledge Base (Solution) 2352231 0 None None None 2016-06-07 14:29:13 UTC

Description Chris Roberts 2016-06-07 14:29:14 UTC
Description of problem:
Navigating to Monitor->Tasks open any task here, click on Dynflow console button, now just try to navigate bak using Back button and it fails with Internal Server Error, on checking /var/log/httpd/error_log can see traceback as below,

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

6.1

Actual results:

[ 2016-05-09 17:31:11.4454 2434/7f66fc10f700 Pool2/Implementation.cpp:1274 ]: [App 2600 stderr] NoMethodError - undefined method `action_class' for nil:NilClass:
[ 2016-05-09 17:31:11.4455 2434/7f66fc10f700 Pool2/Implementation.cpp:1274 ]: [App 2600 stderr]         /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.9/web/views/index.erb:23:in `block in evaluate_source'
[ 2016-05-09 17:31:11.4455 2434/7f66fc10f700 Pool2/Implementation.cpp:1274 ]: [App 2600 stderr]         /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.9/web/views/index.erb:20:in `each'
[ 2016-05-09 17:31:11.4455 2434/7f66fc10f700 Pool2/Implementation.cpp:1274 ]: [App 2600 stderr]         /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.9/web/views/index.erb:20:in `evaluate_source'
[ 2016-05-09 17:31:11.4455 2434/7f66fc10f700 Pool2/Implementation.cpp:1274 ]: [App 2600 stderr]         /opt/rh/ruby193/root/usr/share/gems/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `instance_eval'

Expected results:


Additional info:

Stale or inconsistent data in dynflow tables.

This solution only works if traceback or failure is as below,

[ 2016-05-09 17:31:11.4454 2434/7f66fc10f700 Pool2/Implementation.cpp:1274 ]: [App 2600 stderr] NoMethodError - undefined method `action_class' for nil:NilClass:
[ 2016-05-09 17:31:11.4455 2434/7f66fc10f700 Pool2/Implementation.cpp:1274 ]: [App 2600 stderr]         /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.9/web/views/index.erb:23:in `block in evaluate_source'
Modify /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.7.9/web/views/index.erb and add line 12 and 23 to this file,
Raw
      8 <table class="table">
      9   <thead>
     10     <tr>
     11       <th><%= order_link(:id, "Id") %></th>
     12       <th><%= order_link(:id, "Id-blank") %></th>

     21   <tr>
     22     <td><%= h(plan.id) %></td>
     23     <td><%= h(plan.id) if plan.root_plan_step.nil? %></td>
     24     <td><%= h(plan.root_plan_step.action_class.name) %></td>
Restart httpd service and go to dynflow page, this would display new column 'Id-blank', all tasks numbers displayed below needs to be removed as below,
Raw
# delete from dynflow_steps where execution_plan_uuid in ('126ba0a1-f61c-47e8-b038-579192dbded1','8759041c-6933-414f-a753-8ea9b021cf89','701e3e34-9c70-4349-9ffd-93b94e6230a0','f13b6918-3fec-496a-91f8-45401859363d','e66385cb-896a-4ffe-bece-47b7032079b5');

# delete from dynflow_actions where execution_plan_uuid in ('126ba0a1-f61c-47e8-b038-579192dbded1','8759041c-6933-414f-a753-8ea9b021cf89','701e3e34-9c70-4349-9ffd-93b94e6230a0','f13b6918-3fec-496a-91f8-45401859363d','e66385cb-896a-4ffe-bece-47b7032079b5');

# delete from dynflow_execution_plans where uuid in ('126ba0a1-f61c-47e8-b038-579192dbded1','8759041c-6933-414f-a753-8ea9b021cf89','701e3e34-9c70-4349-9ffd-93b94e6230a0','f13b6918-3fec-496a-91f8-45401859363d','e66385cb-896a-4ffe-bece-47b7032079b5');
Change tasks id in brackets with problematic ids.

Comment 2 Bryan Kearney 2016-07-08 20:38:42 UTC
Per 6.3 planning, moving out non acked bugs to the backlog

Comment 4 Ivan Necas 2017-08-08 15:59:56 UTC
Connecting redmine issue http://projects.theforeman.org/issues/20002 from this bug

Comment 7 Adam Ruzicka 2017-10-11 12:38:25 UTC
Moving to ON_QA, the issue was fixed in the meantime. Latest 6.3 builds already contain the fixed code.

Comment 8 Lukáš Hellebrandt 2018-01-05 11:54:14 UTC
Verified with Sat6.3 snap 30.

Used reproducer from the OP. The reproducer from the connected upstream tracker seems to be related but different issue but I performed the steps from there, too. No ISE was shown in WebUI, no error in logs.

Comment 9 Satellite Program 2018-02-21 16:54:17 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, 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-2018:0336


Note You need to log in before you can comment on or make changes to this bug.