Bug 1501949

Summary: when satellite is starting, there are 4 of "RuntimeError: The Dynflow world was not initialized yet. If your plugin uses it, make sure to call ForemanTasks.dynflow.require! in some initializer" in production.log
Product: Red Hat Satellite Reporter: Jan Hutař <jhutar>
Component: Tasks PluginAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: aruzicka, inecas
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-30 14:51:25 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:
Attachments:
Description Flags
/var/log/foreman/production.log none

Description Jan Hutař 2017-10-13 14:41:01 UTC
Created attachment 1338260 [details]
/var/log/foreman/production.log

Description of problem:
when satellite is starting, there are four of "RuntimeError: The Dynflow world was not initialized yet. If your plugin uses it, make sure to call ForemanTasks.dynflow.require! in some initializer" in production.log


Version-Release number of selected component (if applicable):
satellite-6.3.0-19.0.beta.el7sat.noarch
tfm-rubygem-foreman-tasks-0.9.6-1.fm1_15.el7sat.noarch


How reproducible:
always


Steps to Reproduce:
1. Restart system with Satellite and watch production.log while Satellite
   is starting


Actual results:
See tracebacks in attached log


Expected results:
There should be no tracebacks


Additional info:
Usually tracebacks during start if everything works after that seems harmless, but this one sugests there might be a way how to suppress it: "make sure to call ForemanTasks.dynflow.require! in some initializer"

Comment 2 Adam Ruzicka 2017-10-17 13:22:01 UTC
Additional notes:
When dynflow world is initialized it invalidates execution plans which still have execution locks. Those execution plans are switched from (usually) running state to paused. When the execution plans are saved with the paused state a callback in foreman-tasks is triggered to update the task object in foreman tasks. This however tries to access ForemanTasks.dynflow.world which is not set at that time.

Also restarting the machine seems like an overkill, the following should be enough to trigger the bug

Steps to reproduce:
1) Start a task
2) Kill foreman-tasks with SIGKILL
3) watch production.log
4) restart foreman-tasks service

Comment 3 Adam Ruzicka 2017-10-17 13:22:37 UTC
Created redmine issue http://projects.theforeman.org/issues/21361 from this bug

Comment 4 Bryan Kearney 2018-11-01 14:45:17 UTC
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is  not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Rich Jerrido or Bryan Kearney or your account team. If we do not hear from you, we will close this bug out. Thank you.

Comment 5 Bryan Kearney 2018-11-30 14:51:25 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Rich Jerrido or Bryan Kearney. Thank you.