Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1652060 - Singleton actions may not start after unclean shutdown
Summary: Singleton actions may not start after unclean shutdown
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Tasks Plugin
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.5.0
Assignee: Adam Ruzicka
QA Contact: Jan Hutař
URL:
Whiteboard:
Depends On:
Blocks: 1692806
TreeView+ depends on / blocked
 
Reported: 2018-11-21 13:53 UTC by Adam Ruzicka
Modified: 2021-12-10 18:17 UTC (History)
3 users (show)

Fixed In Version: tfm-rubygem-dynflow-1.1.3,tfm-rubygem-katello-3.10.0.25-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1692806 (view as bug list)
Environment:
Last Closed: 2019-05-14 12:39:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25541 0 Normal Closed Singleton actions may not start after unclean shutdown 2020-08-03 10:38:24 UTC
Github Katello katello pull 7848 0 None closed Fixes #25541 - Trigger singleton actions in post init hook 2020-08-03 10:38:24 UTC
Red Hat Bugzilla 1652056 0 high CLOSED Enhance resiliency mechanism to avoid memory recycler leading to tasks paused with 'Abnormal termination (previous state... 2024-12-20 18:47:08 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:39:13 UTC

Internal Links: 1652056

Description Adam Ruzicka 2018-11-21 13:53:28 UTC
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

How reproducible:
always

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

Actual results:
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.

Expected results:
Old singleton actions get cleaned up, new are started.

Additional info:

Comment 1 Adam Ruzicka 2018-11-21 13:54:30 UTC
This is similar to https://bugzilla.redhat.com/show_bug.cgi?id=1652056, but not completely the same.

Comment 2 Adam Ruzicka 2018-11-23 11:55:33 UTC
Created redmine issue https://projects.theforeman.org/issues/25541 from this bug

Comment 9 Bryan Kearney 2019-02-25 09:06:49 UTC
Upstream bug assigned to aruzicka

Comment 11 Ivan Necas 2019-02-28 15:51:48 UTC
It turns out this was missed cherry-pick of https://github.com/Katello/katello/pull/7848/files, that I don's see in production

Comment 16 errata-xmlrpc 2019-05-14 12:39:03 UTC
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.

https://access.redhat.com/errata/RHSA-2019:1222


Note You need to log in before you can comment on or make changes to this bug.