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
Updated by Ivan Necas about 8 years ago
- Subject changed from World invalidation can fail, when execution plans are missing to World invalidation can fail, when execution plans are missing
- Status changed from New to Ready For Testing
- Target version set to 1.4.1
- Pull request https://github.com/Dynflow/dynflow/pull/206 added
Updated by Adam Ruzicka about 8 years ago
- Status changed from Ready For Testing to Closed
- Assignee set to Ivan Necas
Updated by Ivan Necas almost 8 years ago
Note on cleanup with older versions that don't have the fix:
cat <<EOF | foreman-rake console
w = ForemanTasks.dynflow.world
w.coordinator.find_locks(class: Dynflow::Coordinator::ExecutionLock.name).each do |l|
exists = w.persistence.load_execution_plan(l.execution_plan_id) rescue nil
unless exists
puts "#{l.execution_plan_id} doesn't exist: deleting the lock"
w.coordinator.delete_record(l)
end
end; puts "finished"
EOF
Updated by Ivan Necas almost 8 years ago
- Related to Bug #15729: duplicate key value violates unique constraint "dynflow_coordinator_records_pkey" added
Updated by Ivan Necas almost 8 years ago
- Copied to Bug #19146: World invalidation can fail, when execution plans are invalid added