Bug 1435370

Summary: uploading facts involves synchronous dynflow task, can cause bottleneck
Product: Red Hat Satellite Reporter: Chris Duryee <cduryee>
Component: FactAssignee: Chris Duryee <cduryee>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.8CC: aperotti, bbuckingham, cduryee, daniele, jcallaha, mhulan, mmccune, tstrachota, vivpatil, zhunting
Target Milestone: UnspecifiedKeywords: Performance, PrioBumpField, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-katello-3.0.0.134-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1446710 (view as bug list) Environment:
Last Closed: 2017-06-20 17:23:29 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:
Bug Depends On:    
Bug Blocks: 1353215    
Attachments:
Description Flags
proposed patch to make host update async on fact upload none

Description Chris Duryee 2017-03-23 15:53:31 UTC
Description of problem:

If a Satellite server is heavily loaded and has lots of tasks queued, you may start to see the web UI and API become unresponsive. Many of the passenger workers will be hung waiting on URLs like this:

PUT /rhsm/consumers/<UUID>

The root cause is that updating facts kicks off a synchronous dynflow task. If dynflow is backed up, client fact uploads will get slower and slower, eventually consuming all passenger workers.

Version-Release number of selected component (if applicable): 6.2.8


Steps to Reproduce:
1. create a large number of tasks that have to be run
2. on a registered client, delete /var/lib/rhsm/facts/facts.json and run subscription-manager facts --update


Actual results: slow response, possible timeouts

Expected results: the client should get a reply quickly and the host update can then happen asynchronously. Note that if the async task fails, the client would not be aware.

Comment 1 Chris Duryee 2017-03-23 15:54:13 UTC
Created attachment 1265824 [details]
proposed patch to make host update async on fact upload

Comment 3 Marek Hulan 2017-03-29 07:52:28 UTC
Created redmine issue http://projects.theforeman.org/issues/19061 from this bug

Comment 5 Satellite Program 2017-03-29 18:15:18 UTC
Upstream bug assigned to cduryee

Comment 6 Satellite Program 2017-04-05 18:15:36 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/19061 has been resolved.

Comment 8 Peter Ondrejka 2017-05-26 11:43:23 UTC
Verified in satellite-6.2.10-1.0.el7sat.noarch, updating facts while running a remote job on 3000 hosts was done asynchronously without delay

Comment 12 errata-xmlrpc 2017-06-20 17:23:29 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/RHBA-2017:1553