Bug 1851156

Summary: Empty applicability for non-modular repos
Product: Red Hat Satellite Reporter: Mike McCune <mmccune>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Bruno Rocha <rochacbruno>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.8.0CC: dkliban, iballou, mmccune, rchan, ttereshc
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1847019 Environment:
Last Closed: 2020-06-25 21:08:28 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:

Description Mike McCune 2020-06-25 16:49:53 UTC
+++ This bug was initially created as a clone of Bug #1847019 +++

Regression due to changes in https://bugzilla.redhat.com/show_bug.cgi?id=1816464

The following 2 lines are inconsistent which is causing that the regenerate applicability and the retrieval of the applicability to use the different all_profiles_hash to look for profile.

This is excluding the empty profile https://github.com/pulp/pulp/commit/0016f7ba16e1e3eae983527f98c6a662132894dd#diff-497c4c3e2dfb13249190d0776ea94a5eR347

This is not excluding the empty profile https://github.com/pulp/pulp/commit/0016f7ba16e1e3eae983527f98c6a662132894dd#diff-497c4c3e2dfb13249190d0776ea94a5eL705

How to reproduce the issue:

Make sure everything is clean by deleting orphaned repo profile applicability
celery -A pulp.server.async.app call pulp.server.maintenance.monthly.queue_monthly_maintenance

Register a consumer and subscribe it to a repo. The consumer should have some applicable errata.
$subscription-manager repos --enable rhel-7-server-rpms

$subscription-manager repos --list

Repo ID: rhel-7-server-rpms Repo Name: Red Hat Enterprise Linux 7 Server (RPMs) Repo URL: https://mysatellite.fqdn/pulp/repos/redhat/Library/content/dist/rhel/server/7/$releasever/$basearch/os Enabled: 1

$ yum list-sec rhel-7-server-rpms

RHBA-2019:2224

RHBA-2018:3349

RHSA-2018:3665

Trigger the regenerate applicability for repos and wait for the task to finish.
You'll get empty applicable errata.

--- Additional comment from  on 2020-06-15T13:03:08Z 

The Pulp upstream bug status is at POST. Updating the external tracker on this bug.

--- Additional comment from  on 2020-06-15T13:03:10Z 

The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

--- Additional comment from  on 2020-06-19T12:23:10Z 

*** Bug 1848717 has been marked as a duplicate of this bug. ***

--- Additional comment from  on 2020-06-23T08:17:49Z 

Steps to reproduce https://github.com/pulp/pulp/pull/3990#issuecomment-647978777

--- Additional comment from  on 2020-06-23T09:03:22Z 

The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

--- Additional comment from  on 2020-06-23T10:03:28Z 

All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

--- Additional comment from  on 2020-06-23T18:46:16Z 

Steps to reproduce from the comment#4 didn't work for me.

The only way I could reproduce the issue is the following:
On pulp 2.21.2
1. create or update a host profile for a repo with no modules enabled on the host (so katello send an empty profile for modulemd type). Make sure profile is such that there is applicable content.
2. trigger applicability
3. try to retrieve applicability, you'll get the empty applicability
4. apply the patch form the attached upstream issue (will be in 2.21.3)
5. retrieve applicability again (no regeneration), it should be there.

Comment 2 Mike McCune 2020-06-25 21:08:28 UTC
mistakenly cloned to 6.7.z, 6.8 only