Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1255901 - Lock is used to dispatch applicability calculation for a consumer
Lock is used to dispatch applicability calculation for a consumer
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hosts - Content (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity high (vote)
: 6.2.10
: Unused
Assigned To: Chris Duryee
Renzo Nuccitelli
: Performance, PrioBumpField, Triaged
Depends On:
Blocks: 1353215
  Show dependency treegraph
 
Reported: 2015-08-21 16:12 EDT by Dennis Kliban
Modified: 2018-09-19 11:07 EDT (History)
17 users (show)

See Also:
Fixed In Version: tfm-rubygem-runcible-1.11.0-1 pulp-2.8.7.12-1 tfm-rubygem-katello-3.0.0.137-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1446712 (view as bug list)
Environment:
Last Closed: 2017-06-20 13:20:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Errata available screenshot (28.94 KB, image/png)
2017-06-13 11:47 EDT, Renzo Nuccitelli
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3176801 None None None 2017-09-08 08:44 EDT
Foreman Issue Tracker 19055 None None None 2017-03-28 18:34 EDT
Foreman Issue Tracker 19076 None None None 2017-03-29 12:48 EDT
Pulp Redmine 1173 Normal CLOSED - WONTFIX Content Applicability Regeneration for individual consumers is sent to a single worker 2017-02-10 18:03 EST
Pulp Redmine 2797 High CLOSED - CURRENTRELEASE Single consumer aplicability generation does not work unless profile already has applicability generated 2017-06-23 12:02 EDT
Red Hat Product Errata RHBA-2017:1553 normal SHIPPED_LIVE Satellite 6.2.10 Async Bug Release 2017-06-20 17:19:07 EDT

  None (edit)
Description Dennis Kliban 2015-08-21 16:12:10 EDT
Description of problem:

When a host is registered, an applicability task is kicked off for that consumer. Each task is dispatched with a reservation for 'repository_profile_applicability' resource. This is not a real resource. This causes all these tasks to be processed by a single worker. 

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


How reproducible: Always


Steps to Reproduce:
1. Register a few hosts one right after another 
2. Examine Pulp's database - 'reserved_resource' collection
3. 

Actual results:

The reserved_resource collection has 'repository_profile_applicability' resource reserved.

Expected results:

No reserved_resource documents should exist for applicability tasks.

Additional info:
Comment 1 pulp-infra@redhat.com 2015-08-21 16:44:49 EDT
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.
Comment 2 pulp-infra@redhat.com 2015-08-21 16:44:50 EDT
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.
Comment 4 Bryan Kearney 2016-07-08 16:47:31 EDT
Per 6.3 planning, moving out non acked bugs to the backlog
Comment 6 pulp-infra@redhat.com 2017-01-17 12:33:40 EST
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.
Comment 7 pulp-infra@redhat.com 2017-01-26 10:33:43 EST
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.
Comment 8 pulp-infra@redhat.com 2017-02-08 05:05:13 EST
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.
Comment 9 pulp-infra@redhat.com 2017-02-10 18:03:46 EST
The Pulp upstream bug status is at CLOSED - WONTFIX. Updating the external tracker on this bug.
Comment 10 Michael Hrivnak 2017-02-10 19:47:13 EST
Quoting the upstream issue:

"I suggest to use the API call for a single consumer when there is a need to calculate applicability for just one consumer (this is suitable for Katello use cases)."

http://docs.pulpproject.org/dev-guide/integration/rest-api/consumer/applicability.html#generate-content-applicability-for-a-single-consumer

I'm changing the component since there are no additional steps for Pulp to take. Please move it to the right component in case I've chosen the wrong one.
Comment 12 pm-sat@redhat.com 2017-04-04 12:18:36 EDT
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/19076 has been resolved.
Comment 13 Renzo Nuccitelli 2017-05-30 09:10:29 EDT
Once the fix was made by changing API call for, are the initial "Steps to Reproduce" still valid?
Comment 14 Chris Duryee 2017-06-03 11:07:35 EDT
The steps in #0 are still valid.

The way I've been testing it is as follows:

* view qpid queue stats via 'qpid-stat -q --ssl-certificate=/etc/pki/katello/qpid_client_striped.crt -b amqps://localhost:5671 '
* subscribe some hosts to new repos
* view queue stats again

You should see the 'msgIn' and 'msgOut' columns increase for the 'celery' queue. Without the patch, you would see 'reserved-resource-worker-X@hostname.dq' increase.

To test this without examining the queue stats, you would need to get applicability regen to run on a large number of hosts and then check if all pulp workers were busy (new behavior), or if just one was busy (old behavior).
Comment 15 Renzo Nuccitelli 2017-06-06 10:21:02 EDT
Worked on Satellite 6.2.10. Moving to VERIFIED.
Comment 17 Chris Duryee 2017-06-06 12:21:43 EDT
The applicability regen did not work in some cases due to 2797. To repro:

* create a new product with a yum repo for https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/

* register a host, subscribe to that product, ensure katello-agent is running and package profiles are being uploaded

* install https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/walrus-0.71-1.noarch.rpm to host (older walrus, not newer)


If no applicable errata are shown in the web UI for the host, then you have hit 2797. If one errata appears, then you're good.
Comment 18 pulp-infra@redhat.com 2017-06-06 13:36:04 EDT
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.
Comment 19 pulp-infra@redhat.com 2017-06-06 13:36:08 EDT
The Pulp upstream bug priority is at High. Updating the external tracker on this bug.
Comment 20 pulp-infra@redhat.com 2017-06-07 10:36:05 EDT
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.
Comment 22 pulp-infra@redhat.com 2017-06-07 11:36:07 EDT
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.
Comment 24 Renzo Nuccitelli 2017-06-13 11:47 EDT
Created attachment 1287373 [details]
Errata available screenshot

As can be seen on attached screen shot, after registering host with old repo the relate errata package was made available on Satellite. So I moved this issue to VERIFIED
Comment 25 pulp-infra@redhat.com 2017-06-14 10:31:37 EDT
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.
Comment 27 errata-xmlrpc 2017-06-20 13:20:37 EDT
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
Comment 28 pulp-infra@redhat.com 2017-06-23 12:02:11 EDT
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

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