Project

Profile

Help

Test #4952

closed

Pulp - Test #4942: [EPIC] - Pulp2 - 2.20

Missing rpms in erratum pkglist when an erratum appears in multiple repos caused wrong applicability calculation.

Added by bherring over 5 years ago. Updated over 5 years ago.

Status:
CLOSED - COMPLETE
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Version:
2.18.1
Platform Release:
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description of problem:
Pulp will returns wrong 'pkglist' if an erratum exists in multiple repositories and user syncs multiple of these repositories

For example:
Erratum 'RHSA-2019:1235' exists in both 'rhel-7-server-rpms' repo and 'rhel-7-server-optional-debug-rpms' repo with the following 'pkglist' respectively

rhel-7-server-rpms:
"ruby-libs-2.0.0.648-35.el7_6.x86_64.rpm",
"ruby-libs-2.0.0.648-35.el7_6.i686.rpm",
"ruby-2.0.0.648-35.el7_6.x86_64.rpm",
"rubygem-bigdecimal-1.2.0-35.el7_6.x86_64.rpm",
"rubygem-psych-2.0.0-35.el7_6.x86_64.rpm",
"rubygem-rdoc-4.0.0-35.el7_6.noarch.rpm",
"ruby-irb-2.0.0.648-35.el7_6.noarch.rpm",
"rubygem-io-console-0.4.2-35.el7_6.x86_64.rpm",
"rubygems-2.0.14.1-35.el7_6.noarch.rpm",
"rubygem-json-1.7.7-35.el7_6.x86_64.rpm"

rhel-7-server-optional-debug-rpms:
"ruby-debuginfo-2.0.0.648-35.el7_6.x86_64.rpm",

After syncing these 2 repos to the Satellite, Pulp will only list the 'ruby-debuginfo rpm' in the erratum 'pkglist'. Pulp will calculate the wrong applicability for the consumer because the erratum is listing only 1 rpm.

Test in "foreman-rake console":

  1. Before enabling debug repo, the erratum shows 10 packages:
    pp Katello::pulp_server.resources.repository.unit_search("046aa6b4-6369-4ef7-a3f7-3959250bd86f", {:type_ids => ['erratum'], filters: {unit: {"errata_id": "RHSA-2019:1235"}}})[0]['metadata']['pkglist'][0]['packages'].size
    10
  1. After enabling and sync debug repo. the erratum shows only 1 package.
    pp Katello::pulp_server.resources.repository.unit_search("046aa6b4-6369-4ef7-a3f7-3959250bd86f", {:type_ids => ['erratum'], filters: {unit: {"errata_id": "RHSA-2019:1235"}}})[0]['metadata']['pkglist'][0]['packages'].size
    1

pp Katello::pulp_server.resources.repository.unit_search("046aa6b4-6369-4ef7-a3f7-3959250bd86f", {:type_ids => ['erratum'], filters: {unit: {"errata_id": "RHSA-2019:1235"}}})[0]['metadata']['pkglist'][0]['packages'][0]['filename']
"ruby-debuginfo-2.0.0.648-35.el7_6.x86_64.rpm"

exit

Steps to Reproduce:
1. Ensure you have a RHEL 7 client with older ruby version. Lets say Client 'A'.
2. Enable and sync 'rhel-7-server-rpms' repo
3. Go to Web UI -> Hosts -> Content Hosts -> Client 'A' -> Errata tab -> Filter "id = RHSA-2019:1235" should show this erratum is applicable/installable.
4. Enable and sync 'rhel-7-server-optional-debug-rpms' repo
5. Now need to do something so that we can FORCE recalculate the applicability for Client 'A'

On client 'A' do:
subscription-manager repos --enable="rhel-7-server-optional-debug-rpms"
katello-enabled-repos-upload -f

6. Wait for the regenerate applicability task to finish
7. Go to Web UI -> Hosts -> Content Hosts -> Client 'A' -> Errata tab -> Filter "id = RHSA-2019:1235" shows empty result.

Actual results:
Errata RHSA-2019:1235 is not applicable to Client A

Expected results:
Errata RHSA-2019:1235 is applicable to the Client A


Related issues

Copied from RPM Support - Issue #4880: Missing rpms in erratum pkglist when an erratum appears in multiple repos caused wrong applicability calculation.CLOSED - CURRENTRELEASEttereshcActions

Also available in: Atom PDF