Description of problem:
We trigger singleton actions (LOCE, EQM) from dynflow's on_init hook. Recently we moved invalidation to happen after running the hooks. It is now possible to get into a situation where
1) On init hook is run, singleton actions fail because a lock is being held by another execution plan
2) Invalidation is performed, old actions fail with abnormal termination error and their locks are released
3) The satellite is left without LOCE and EQM
We used to do steps 1 and 2 in reverse order which worked, but changed that because of another issue.
Version-Release number of selected component (if applicable):
Satellite 6.4 and newer is most likely affected
Steps to Reproduce:
0. (optional) Patch LOCE to make this easier to reproduce, add a lengthy sleep into its run method
1. systemctl kill --signal=9 foreman-tasks when the singleton action's step is running
2. systemctl restart foreman-tasks
New singleton actions fail with "$ACTION_CLASS is already active", old singleton actions fail with abnormal termination error, satellite is left without LOCE and EQM.
Old singleton actions get cleaned up, new are started.
This is similar to https://bugzilla.redhat.com/show_bug.cgi?id=1652056, but not completely the same.
Created redmine issue https://projects.theforeman.org/issues/25541 from this bug
Upstream bug assigned to aruzicka
It turns out this was missed cherry-pick of https://github.com/Katello/katello/pull/7848/files, that I don's see in production
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.