Bug 1635540

Summary: Running a `sync_task` while the tasks service gets restarted might lead to passenger process hanging forever
Product: Red Hat Satellite Reporter: Ivan Necas <inecas>
Component: Tasks PluginAssignee: Ivan Necas <inecas>
Status: CLOSED ERRATA QA Contact: Jan Hutaƙ <jhutar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.2CC: andrew.schofield, aruzicka, egolov, inecas, jhutar, mmccune, sthirugn
Target Milestone: 6.5.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman-tasks-0.14.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1661292 (view as bug list) Environment:
Last Closed: 2019-05-14 12:38:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ivan Necas 2018-10-03 08:08:04 UTC
1. trigger an action that involves `sync_task` (I've used "curl -X POST -k -u admin:changeme -H 'Content-Type: application/json' -d '{"name":"product-'$RANDOM'","organization_id":"1"}' https://localhost/katello/api/v2/products", but e.g. host add_subscriptions uses `sync_task` ask well inside.
2. force-kill the dynflow_executor process while the task is running
3. restart foreman-tasks service
4. resume the task that got paused during the restart

Even though the task finished after resuming in point (4), the original web request did not get finished (the curl hangs, passenger-status --show=requests shows the request in the queue

Comment 1 Ivan Necas 2018-10-03 08:08:51 UTC
Created redmine issue https://projects.theforeman.org/issues/25109 from this bug

Comment 4 Satellite Program 2018-10-03 12:01:51 UTC
Upstream bug assigned to inecas

Comment 5 Satellite Program 2018-10-03 12:01:54 UTC
Upstream bug assigned to inecas

Comment 6 Satellite Program 2018-10-04 16:01:49 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25109 has been resolved.

Comment 22 errata-xmlrpc 2019-05-14 12:38:11 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