Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1862262

Summary: Some applicability of the consumers are not recalculated after syncing a repository
Product: Red Hat Satellite Reporter: James Jeffers <jjeffers>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Lai <ltran>
Severity: unspecified Docs Contact:
Priority: high    
Version: 6.7.0CC: bmbouter, dkliban, egolov, ggainey, hyu, ipanova, jsherril, ktordeur, pmoravec, rchan, satellite6-bugs, ttereshc
Target Milestone: 6.7.3Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pulp-2.21.0.2-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1835241 Environment:
Last Closed: 2020-09-02 14:25:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 2 pulp-infra@redhat.com 2020-07-31 00:11:43 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 3 pulp-infra@redhat.com 2020-07-31 00:11:44 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 4 pulp-infra@redhat.com 2020-07-31 01:04:54 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 7 James Jeffers 2020-08-19 15:13:22 UTC
Steps to reproduce/verify:

- create a repo, but don't sync it
- register 11 clients
- make sure each client has subscribed to the repo
- install a downlevel version of a package that is addressed in an errata for that repo (ensure there is applicable errata)
- sync the repo

That should force applicability generation in a batch mode vs 1-by-1 per client.

After the sync all clients should show as applicable.

Comment 9 Lai 2020-08-28 01:12:11 UTC
Failing QA.

Steps to reproduce.

1. Spin up and register 11 clients to the satellite.
2. Create custom animal repo and sync it
3. Create cv with animal repo and publish.
4. Subscribe all 11 clients to cv and ensure that the animal repo is enabled as well as getting contents from the cv.
5. Install a downgraded version of one of the packages (I used kangaroo and/or walrus)
6. Delete cv and custom repo.
7. Create a new animal custom repo but don't sync it.
8. Create a new cv with custom repo and publish.
9. Subscribe all 11 clients to cv and make sure client is getting consuming from cv.
10. Sync new custom repo and publish cv
11. Check content host page and check each content host to see if the applicable errata is present.

Exepcted:
Expect to see each content host to have applicable errata count on the content host page and expect to see the applicable errata show up in the errata tab for each content host.

Actual
Each content host does not have applicable errata count present.  Each content host does not show the applicable errata on their respective errata page.

Additional note: In the errata page of the content host, if you select library environment, you may see the applicable errata show up but they cannot be applied.

Weirdly enough, the regenerate applicability task is seen as successful is the dynaflow page.

Failed on 6.7.3 snap 1.

Comment 10 pulp-infra@redhat.com 2020-08-28 02:05:55 UTC
Requesting needsinfo from upstream developer dkliban, ttereshc because the 'FailedQA' flag is set.

Comment 12 Tanya Tereshchenko 2020-08-28 08:24:21 UTC
If those 11 clients are the only ones managed by your Satelllite, please provide the output for this command to see if Pulp calculated the applicability.
mongo pulp_database --eval 'db.repo_profile_applicability.find().shellPrint()'

Comment 13 pulp-infra@redhat.com 2020-08-28 09:05:26 UTC
Requesting needsinfo from upstream developer ttereshc because the 'FailedQA' flag is set.

Comment 15 pulp-infra@redhat.com 2020-08-28 20:06:23 UTC
Requesting needsinfo from upstream developer dkliban, ttereshc because the 'FailedQA' flag is set.

Comment 16 Tanya Tereshchenko 2020-08-31 16:37:30 UTC
Lai, it depends from which repo you expect to have applicable packages.

There are no applicable packages for any hist for a repo e483892d-445a-4904-b199-3a6833eaee0c.
For other repos, there are applicable packages.
So data looks valid but it's hard to tell without knowing host profiles and repo content.

You mentioned today that you have couple things to try. Let me know how it goes. So far data looks valid but I don't have all info needed to say for sure.

Comment 17 pulp-infra@redhat.com 2020-08-31 17:05:26 UTC
Requesting needsinfo from upstream developer ttereshc because the 'FailedQA' flag is set.

Comment 18 Lai 2020-08-31 18:44:37 UTC
Tanya,

Justin is helping me with the testing.  He's checking the backend and investigating.

Comment 19 Lai 2020-08-31 20:46:50 UTC
Steps to test.

1. Spin up and register 11 clients to the satellite.
2. Create custom animal repo and sync it
3. Sync rhel tools repo
4. Create cv and add animal repo and rhel tools repo to it.
5. Publish
6. Create an activation key with cv and lce that it's in from step 4.
7. Subscribe the prod from step 2 in the ak
8. Register 11 hosts to ak.
9. Install a downgraded version of one of the packages (I used kangaroo and/or walrus)
10. Install katello-host-tools
11. Create another custom animal repo, but do not sync it
12. Create another cv and add the new animal repo to it and publish.
13. Create a new ak with the cv and lce that it's in from step 12
14 Subscribe the prod from step 11 to ak.
15. Reregister all 11 hosts to the new ak.
16. Run 'subscription-manager refresh; subscription-manager repos --list' on all 11 hosts
17. Sync the new custom animal repo created in step 11.
18. Publish a new version of the cv created in step 12.
19. Check content hosts page

Expected:
all 11 hosts should have applicable errata count show up on the page.  If you drill into the individual host and go to the errata tab, the applicable errata should show up on the list.

Actual
All 11 hosts have applicable errata count show up on the page.  Drilling into the individual host and going to the errata tab shows the applicable errata.

Verified on 6.7.3 snap 1.

Note: the workaround to get the the count and applicable errata to show up is to run 'subscription-manager refresh; subscription-manager repos --list' on the host.



Verified on 6.7.3 snap 1.

Comment 24 errata-xmlrpc 2020-09-02 14:25:06 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 (Satellite 6.7.3 Async Bug Fix Update), 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-2020:3614