Bug #17177
closedWorld invalidation can fail, when execution plans are missing
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1390931
Description of problem:
Under some circumstances (such as manually deleting data from dynflow_execution_plan),
Version-Release number of selected component (if applicable):
How reproducible:
under special circumstances
Steps to Reproduce:
1. trigger a task
2. while the task is runnint, delete data from dynflow manually (CAUTION: THIS IS BY NO MEANS A RECOMMENDED WAY OF DEALING WITH TASKS - FOR REPRODUCER PURPOSES ONLY):
psql foreman
delete from foreman_tasks_tasks;
delete from foreman_tasks_locks;
delete from dynflow_steps;
delete from dynflow_actions;
delete from dynflow_execution_plans
exit
3. force kill the dynflow executor process
4. restart the foreman-tasks service
Actual results:
in logs, there is invalid worlds found message, where at the terminated world uuid, there ie "searching: 'execution_plan by: {:uuid=>\"'..."
the world
/foreman_tasks/dynflow/worlds still shows the world in the list
Expected results:
dynlfow is able to handle this situation, by skipping the deleted plans