Bug 1188120

Summary: Applicability API returning no results
Product: Red Hat Satellite Reporter: Mike McCune <mmccune>
Component: Content ManagementAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: cduryee
Target Milestone: UnspecifiedKeywords: Reopened
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-06 16:40:53 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: 1145795    

Description Mike McCune 2015-02-02 06:31:46 UTC
Created a consumer with 1 package installed, profile via: 

/pulp/api/v2/consumers/integration_test_consumer_support/profiles/ 

          "profile":
           [
               {
                   "vendor": "Fedora",
                   "name": "elephant",
                   "epoch": 0,
                   "version": "0.2",
                   "release": "0.7",
                   "arch": "noarch"
               }
           ],
           "_href": "/pulp/api/v2/consumers/integration_test_consumer_support/profiles/integration_test_consumer_support/rpm/",
           "content_type": "rpm",
           "_ns": "consumer_unit_profiles",
           ....


Bound to the repo in question via:

/pulp/api/v2/consumers/integration_test_consumer_support/bindings/

[
   {
       "notify_agent": false,
       "repo_id": "integration_test_id",
       "_href": "/pulp/api/v2/consumers/integration_test_consumer_support/bindings/integration_test_id/yum_dist/",
       "type_id": "yum_distributor",
       "deleted": false,
       "_ns": "consumer_bindings",
       "_id":
       {
           "$oid": "54ce97abb2ff9879e94e1b70"
       },
       "consumer_id": "integration_test_consumer_support",
...

which contains a new version of above 'elephant' package via:

/pulp/api/v2/repositories/integration_test_id/search/units/

[
   {
....snip....
    },
   {
       "updated": "2015-02-02T06:15:11Z",
       "repo_id": "integration_test_id",
       "created": "2015-02-02T06:15:11Z",
       "_ns": "repo_content_units",
       "unit_id": "df36fed0-1c03-4c3c-ade3-0363b51aa0fa",
       "metadata":
       {
           "_id": "df36fed0-1c03-4c3c-ade3-0363b51aa0fa",
           "name": "elephant",
           "version": "0.3",
           "_content_type_id": "rpm"
       },
       "unit_type_id": "rpm",
       "owner_type": "importer",
       "_id":
       {
           "$oid": "54cf15efb2ff981e8887d7e5"
       },
       "id": "54cf15efb2ff981e8887d7e5",
       "owner_id": "yum_importer"
   },

we regenerated applicability:

 "POST /pulp/api/v2/consumers/actions/content/regenerate_applicability//

and fetched it after the task is done but nothing in it:



    [
       {
           "applicability":
           {
               "rpm":
               [
                   "df36fed0-1c03-4c3c-ade3-0363b51aa0fa"
               ],
               "erratum":
               [
               ]
           },
           "consumers":
           [
               "integration_test_consumer_support"
           ]
       }
    ]

Comment 1 Mike McCune 2015-02-02 06:32:08 UTC
using : pulp-server-2.6.0-0.5.beta.el6.noarch

Comment 2 Chris Duryee 2015-02-02 21:10:23 UTC
This appears to be caused by the erratum's package list mentioning an elephant package with no epoch, whereas the elephant 0.3 package itself has an epoch of "0". Thus, the erratum is not applicable since it does not contain a package that the consumer has access to.

I am closing this BZ but feel free to re-open or reach out on IRC if updating the erratum does not fix this, or if you need any help otherwise.

Comment 3 RHEL Program Management 2015-03-03 20:19:27 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.