Project

Profile

Help

Issue #8874

closed

incorrect migration of modular errata casues KeyError: 'name' when syncing from Pulp 3 to Pulp 2

Added by ttereshc almost 3 years ago. Updated over 2 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
3. High
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Katello
Sprint:
Sprint 101
Quarter:

Description

According to the original report , the failure is seen for RHEL 8 Appstream repos.

I was able to reproduce it with this repo but not Appstream:

  Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 294, in run
      self.update_content(metadata_files, url)
    File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 627, in update_content
      purge.purge_unwanted_units(metadata_files, self.conduit, self.config, catalog)
    File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/purge.py", line 45, in purge_unwanted_units
      remove_missing_errata(metadata_files, conduit)
    File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/purge.py", line 148, in remove_missing_errata
      updateinfo.process_package_element)
    File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/purge.py", line 277, in get_remote_units
      for unit in package_info_generator:
    File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/repomd/packages.py", line 64, in package_list_generator
      package_info = process_func(element)
    File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/repomd/updateinfo.py", line 33, in process_package_element
      pkglists = map(_parse_pkglist, element.findall('pkglist') or [])
    File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/repomd/updateinfo.py", line 102, in _parse_pkglist
      return map(_parse_collection, element.findall('collection') or [])
    File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/repomd/updateinfo.py", line 116, in _parse_collection
      ret['module'] = _parse_module(module_elements[0])
    File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/repomd/updateinfo.py", line 171, in _parse_module
      'name': element.attrib['name'],
  KeyError: 'name'

It's unclear if the content has to be migrated or if the problem can be reproduced if the upstream repos are synced to pulp3 directly.


Related issues

Related to Migration Plugin - Backport #9173: Backport #8874 "incorrect migration of modular errata" to 0.11.zCLOSED - CURRENTRELEASE

Actions
Actions #1

Updated by dalley almost 3 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dalley
  • Triaged changed from No to Yes
  • Sprint set to Sprint 98
Actions #2

Updated by rchan almost 3 years ago

  • Sprint changed from Sprint 98 to Sprint 99
Actions #3

Updated by dalley almost 3 years ago

  • Status changed from ASSIGNED to NEW
  • Assignee deleted (dalley)
Actions #4

Updated by rchan almost 3 years ago

  • Sprint changed from Sprint 99 to Sprint 100
Actions #5

Updated by dalley almost 3 years ago

  • Tags Katello added
Actions #6

Updated by dalley almost 3 years ago

  • Priority changed from Normal to High
Actions #7

Updated by rchan almost 3 years ago

  • Sprint changed from Sprint 100 to Sprint 101
Actions #8

Updated by dalley over 2 years ago

  • Severity changed from 2. Medium to 3. High
Actions #9

Updated by ttereshc over 2 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc
Actions #10

Updated by ttereshc over 2 years ago

  • Subject changed from KeyError: 'name' when syncing from Pulp 3 to Pulp 2 to incorrect migration of modular errata casues KeyError: 'name' when syncing from Pulp 3 to Pulp 2
Actions #11

Updated by ttereshc over 2 years ago

  • Description updated (diff)
Actions #12

Updated by ttereshc over 2 years ago

https://github.com/pulp/pulp-2to3-migration/pull/415

The fix is only for the new migrations.
For those who started a migration but have not switched to using RPM plugin in Pulp 3, please run migration reset for RPM plugin and re-run migration afterwards.
For those who already switched to using Pulp 3, resync a repo from a remote source and it will fix it for you.

Actions #13

Updated by ttereshc over 2 years ago

  • Project changed from RPM Support to Migration Plugin
Actions #14

Updated by ttereshc over 2 years ago

  • Related to Backport #9173: Backport #8874 "incorrect migration of modular errata" to 0.11.z added

Added by ttereshc over 2 years ago

Revision 9fde0cc4 | View on GitHub

Fix modular errata migration

Wrong initialization of UpdateCollectionModule in createrepo_c which led to all fields being set to null didn't cause any failures but produced a wrong result <module version=0/>.

closes #8874 https://pulp.plan.io/issues/8874

Added by ttereshc over 2 years ago

Revision 9fde0cc4 | View on GitHub

Fix modular errata migration

Wrong initialization of UpdateCollectionModule in createrepo_c which led to all fields being set to null didn't cause any failures but produced a wrong result <module version=0/>.

closes #8874 https://pulp.plan.io/issues/8874

Added by ttereshc over 2 years ago

Revision 9fde0cc4 | View on GitHub

Fix modular errata migration

Wrong initialization of UpdateCollectionModule in createrepo_c which led to all fields being set to null didn't cause any failures but produced a wrong result <module version=0/>.

closes #8874 https://pulp.plan.io/issues/8874

Actions #16

Updated by ttereshc over 2 years ago

  • Status changed from ASSIGNED to MODIFIED
Actions #17

Updated by ttereshc over 2 years ago

  • Sprint/Milestone set to 0.13.0
Actions #18

Updated by pulpbot over 2 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF