Project

General

Profile

Actions

Bug #17177

closed

World invalidation can fail, when execution plans are missing

Added by Ivan Necas over 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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


Related issues 2 (0 open2 closed)

Related to foreman-tasks - Bug #15729: duplicate key value violates unique constraint "dynflow_coordinator_records_pkey"Closed07/19/2016Actions
Copied to foreman-tasks - Bug #19146: World invalidation can fail, when execution plans are invalidClosedIvan Necas11/02/2016Actions
Actions #1

Updated by Ivan Necas over 7 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
Actions #2

Updated by Adam Ruzicka over 7 years ago

  • Status changed from Ready For Testing to Closed
  • Assignee set to Ivan Necas
Actions #3

Updated by Ivan Necas about 7 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

Actions #4

Updated by Ivan Necas about 7 years ago

  • Related to Bug #15729: duplicate key value violates unique constraint "dynflow_coordinator_records_pkey" added
Actions #5

Updated by Ivan Necas about 7 years ago

  • Copied to Bug #19146: World invalidation can fail, when execution plans are invalid added
Actions

Also available in: Atom PDF