Issue #2793
closedapplicable rpms only show up if at least one errata is applicable
Description
Steps to reproduce:
1) Register a consumer
2) create and sync a yum repository without errata (such as centos7 updates http://mirror.centos.org/centos/7/updates/x86_64/)
3) bind the consumer to repo 2)
4) ensure that at least one package is older than is available (such as running 'yum downgrade screen')
5) generate repo applicability using the call:
POST /pulp/api/v2/consumers/actions/content/regenerate_applicability/ with body:
{ 'consumer_criteria' : { 'filters' : { 'id' : { '$in' : [UUID] } } } }
6) fetch applicable rpm ids:
/consumers/content/applicability/
{
'criteria' : { 'filters' : { 'id' : { '$in' : [UUID] } } },
'content_types' : ['rpm']
}
The list will be empty. However if you then
7) create a new repo with errata (https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/), sync it
8) bind that repo to the consumer
9) install the older version of walrus (0.71)
10) trigger applicability generation in the same way
11) fetch applicable rpm ids again
you'll see that now walrus AND the needed centos rpms are showing as applicable. The rpms applicable from the 2nd repo have nothing to do with the first repo. It seems like maybe pulp is ignoring all applicable rpms if no errata are applicable.
Updated by ttereshc over 7 years ago
- Priority changed from Normal to High
- Triaged changed from No to Yes
Updated by ttereshc over 7 years ago
I can't reproduce it. I tried both master and 2.12.2.
@jsherril, do you have a specific example of the package you downgraded (screen does not seem to be in the example repo)
What I did:
- created and synced repo "centos" http://mirror.centos.org/centos/7/updates/x86_64/
- added consumer
curl -H "Accept: application/json" -X POST -d '{"id": "con1"}' -k -u admin:admin 'https://localhost/pulp/api/v2/consumers/'
- bound consumer to repo "centos"
curl -H "Accept: application/json" -X POST -d '{"notify_agent": false, "repo_id": "centos", "distributor_id": "yum_distributor"}' -k -u admin:admin 'https://localhost/pulp/api/v2/consumers/con1/bindings/'
- set consumer profile with NetworkManager version lower than in repo
curl -H "Accept: application/json" -X POST -d '{ "content_type": "rpm", "profile": [{"arch": "x86_64", "epoch": 1, "name": "NetworkManager", "release": "13.el7_3", "vendor": "smth", "version": "1.3.0"}] }' -k -u admin:admin "https://localhost/pulp/api/v2/consumers/con1/profiles/"
- requested applicability regeneration
curl -H "Accept: application/json" -X POST -d '{"consumer_criteria": {"filters": {"id": {"$in": ["con1"]}}}}' -k -u admin:admin 'https://localhost/pulp/api/v2/consumers/actions/content/regenerate_applicability/'
- fetch the applicability for consumer
curl -H "Accept: application/json" -X POST -d '{"content_types": ["rpm"],"criteria": {"filters": {"id": {"$in": ["con1"]}}}}' -k -u admin:admin 'https://localhost/pulp/api/v2/consumers/content/applicability/'
[
{
"applicability": {
"rpm": [
"2339ea0f-0b35-49bd-9293-02395882e3a8",
"2bfd0a3b-f1c9-46f2-b763-b3a390c614d2",
"b004bdf4-010b-4d2c-8f37-3ca94e360af6",
"ced8e105-410a-457d-a8b5-a87cc4f94c04",
"e266726a-6801-4782-a065-17afdbc6f921"
]
},
"consumers": [
"con1"
]
}
]
Updated by ttereshc about 7 years ago
- Status changed from NEW to CLOSED - WORKSFORME