Project

Profile

Help

Issue #2504

closed

errata applicability fails if errata packagelist doesn't exist

Added by jsherril@redhat.com over 7 years ago. Updated almost 4 years ago.

Status:
CLOSED - WORKSFORME
Priority:
High
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
2.10.0
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 13
Quarter:

Description

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:

"traceback"=>"Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 488, in __call__
    return super(Task, self).__call__(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 103, in __call__
    return super(PulpTask, self).__call__(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__
    return self.run(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/managers/consumer/applicability.py", line 107, in regenerate_applicability_for_consumers
    manager.regenerate_applicability(profile_hash, content_type, profile_id, repo_id)
  File "/usr/lib/python2.7/site-packages/pulp/server/managers/consumer/applicability.py", line 257, in regenerate_applicability
    profiler_conduit)
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/profilers/yum.py", line 65, in calculate_applicable_units
    bound_repo_id, config, conduit)}
  File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/profilers/yum.py", line 212, in _calculate_applicable_units
    unit, profile_lookup_table, available_rpm_nevras)
  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

This used to work (on at least 2.8.7), but no longer does on 2.9.3 an newer.

Actions #1

Updated by jsherril@redhat.com over 7 years ago

I wouldn't necessarily disagree if its argued that this is an invalid errata, however it shouldn't break applicability generation for the entire repo.

I could see arguments being made that it should be ignored or skipped during sync.

Actions #2

Updated by bizhang about 7 years ago

  • Priority changed from Normal to High
  • Sprint/Milestone set to 31
  • Severity changed from 2. Medium to 3. High
  • Triaged changed from No to Yes
Actions #4

Updated by jortel@redhat.com about 7 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to jortel@redhat.com
Actions #5

Updated by jortel@redhat.com about 7 years ago

This works for me on f23 using pulp 2.11 and the fixtures repository noted in the description. The errata.metadata['pkglist'] is [] instead of None. I will continue to investigate.

Actions #6

Updated by jortel@redhat.com about 7 years ago

  • Status changed from ASSIGNED to CLOSED - WORKSFORME

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.

Actions #7

Updated by bmbouter about 6 years ago

  • Sprint set to Sprint 13
Actions #8

Updated by bmbouter about 6 years ago

  • Sprint/Milestone deleted (31)
Actions #9

Updated by bmbouter almost 5 years ago

  • Tags Pulp 2 added
Actions #10

Updated by bmbouter almost 4 years ago

  • Category deleted (14)

We are removing the 'API' category per open floor discussion June 16, 2020.

Also available in: Atom PDF