Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1409865 - Syncing errata without a package list breaks applicability generation
Summary: Syncing errata without a package list breaks applicability generation
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-03 16:34 UTC by Justin Sherrill
Modified: 2021-04-06 17:54 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-06 19:54:11 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 2504 0 High CLOSED - WORKSFORME errata applicability fails if errata packagelist doesn't exist 2017-01-06 18:01:53 UTC

Description Justin Sherrill 2017-01-03 16:34:21 UTC
Description of problem:

If you sync a repo with an errata that does not have a package list such as this one here:

https://github.com/Katello/runcible/blob/master/test/fixtures/repositories/zoo5/updateinfo.xml#L3-L9

and then try to generate applicability for a consumer, you will get an error:

  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/profilers/yum.py", line 314, in _is_errata_applicable
    errata_rpms = YumProfiler._get_rpms_from_errata(errata)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/profilers/yum.py", line 292, in _get_rpms_from_errata
    for pkgs in errata.metadata['pkglist']:
TypeError: 'NoneType' object is not iterable

and the applicability is not generated for that client.

Version-Release number of selected component (if applicable):
6.3

How reproducible:
Always

Steps to Reproduce:
1. git checkout https://github.com/Katello/runcible/
2. sync the repo in runcible/test/fixtures/repositories/zoo5
3. register a client and assign it to the product created for step #2
4. the applicability should get generated for this client and you should see a traceback in /var/log/messages indicating a failure

Actual results:
traceback, applicability isn't generated

Expected results:
no traceback, applicability is generated

Additional info:

Comment 2 Justin Sherrill 2017-01-03 16:53:51 UTC
Note, i don't think this is a problem for 6.2, but will be for 6.3

Comment 3 pulp-infra@redhat.com 2017-01-03 17:01:21 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 4 pulp-infra@redhat.com 2017-01-03 17:01:24 UTC
The Pulp upstream bug priority is at High. Updating the external tracker on this bug.

Comment 5 pulp-infra@redhat.com 2017-01-05 20:01:35 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 6 pulp-infra@redhat.com 2017-01-06 18:01:54 UTC
The Pulp upstream bug status is at CLOSED - WORKSFORME. Updating the external tracker on this bug.

Comment 7 Jeff Ortel 2017-01-06 19:54:11 UTC
This works for me. After discussion with jsherril (reporter) who is also unable to reproduce, we decided to close and reopen should the problem re-appear.


Note You need to log in before you can comment on or make changes to this bug.