---
# System prepended metadata

title: zammad repo issue

---

# zammad repo issue

* Repo details:

~~~
[zammad]
name=Repository for zammad/zammad (stable) packages.
baseurl=https://dl.packager.io/srv/rpm/zammad/zammad/stable/el/8/$basearch
enabled=1
gpgcheck=0
repo_gpgcheck=1
gpgkey=https://dl.packager.io/srv/zammad/zammad/key
~~~

* When i sync the same repo in Satellite 6.9 (pulp2), No issues:

~~~
Apr 25 19:21:04 saydas-rhsat pulp: pulp_rpm.plugins.importers.yum.sync:INFO: [c348384b] Parsing metadata.
Apr 25 19:21:04 saydas-rhsat pulp: pulp_rpm.plugins.importers.yum.sync:INFO: [c348384b] Downloading metadata from https://dl.packager.io/srv/rpm/zammad/zammad/stable/el/8/x86_64/.
Apr 25 19:21:04 saydas-rhsat pulp: urllib3.connectionpool:INFO: Starting new HTTPS connection (1): dl.packager.io
Apr 25 19:21:06 saydas-rhsat pulp: nectar.downloaders.threaded:INFO: Download succeeded: https://dl.packager.io/srv/rpm/zammad/zammad/stable/el/8/x86_64/repodata/repomd.xml.
Apr 25 19:21:06 saydas-rhsat pulp: pulp_rpm.plugins.importers.yum.sync:INFO: [c348384b] Parsing metadata.
Apr 25 19:21:06 saydas-rhsat pulp: pulp_rpm.plugins.importers.yum.sync:INFO: [c348384b] Downloading metadata from https://dl.packager.io/srv/rpm/zammad/zammad/stable/el/8/x86_64/.
Apr 25 19:21:06 saydas-rhsat pulp: urllib3.connectionpool:INFO: Starting new HTTPS connection (1): dl.packager.io
Apr 25 19:21:07 saydas-rhsat pulp: nectar.downloaders.threaded:INFO: Download succeeded: https://dl.packager.io/srv/rpm/zammad/zammad/stable/el/8/x86_64/repodata/repomd.xml.
Apr 25 19:21:07 saydas-rhsat pulp: pulp_rpm.plugins.importers.yum.sync:INFO: [c348384b] Parsing metadata.
Apr 25 19:21:07 saydas-rhsat pulp: pulp_rpm.plugins.importers.yum.sync:INFO: [c348384b] Downloading metadata files.
Apr 25 19:21:07 saydas-rhsat pulp: urllib3.connectionpool:INFO: Starting new HTTPS connection (1): dl.packager.io
Apr 25 19:21:07 saydas-rhsat pulp: urllib3.connectionpool:INFO: Starting new HTTPS connection (1): dl.packager.io
Apr 25 19:21:07 saydas-rhsat pulp: urllib3.connectionpool:INFO: Starting new HTTPS connection (1): dl.packager.io
Apr 25 19:21:08 saydas-rhsat pulp: nectar.downloaders.threaded:INFO: Download succeeded: https://dl.packager.io/srv/rpm/zammad/zammad/stable/el/8/x86_64/repodata/other.xml.gz.
Apr 25 19:21:08 saydas-rhsat pulp: nectar.downloaders.threaded:INFO: Download succeeded: https://dl.packager.io/srv/rpm/zammad/zammad/stable/el/8/x86_64/repodata/filelists.xml.gz.
Apr 25 19:21:08 saydas-rhsat pulp: nectar.downloaders.threaded:INFO: Download succeeded: https://dl.packager.io/srv/rpm/zammad/zammad/stable/el/8/x86_64/repodata/primary.xml.gz.
Apr 25 19:21:08 saydas-rhsat pulp: pulp_rpm.plugins.importers.yum.sync:INFO: [c348384b] Generating metadata databases.
Apr 25 19:21:09 saydas-rhsat pulp: pulp_rpm.plugins.importers.yum.sync:INFO: [c348384b] Determining which units need to be downloaded.
Apr 25 19:21:10 saydas-rhsat named[1399]: resolver priming query complete
Apr 25 19:21:20 saydas-rhsat pulp: pulp_rpm.plugins.importers.yum.purge:INFO: [c348384b] Removing missing units.
Apr 25 19:21:21 saydas-rhsat pulp: pulp_rpm.plugins.importers.yum.sync:INFO: [c348384b] Downloading additional units.
Apr 25 19:21:21 saydas-rhsat pulp: urllib3.connectionpool:INFO: Starting new HTTPS connection (1): dl.packager.io
Apr 25 19:21:21 saydas-rhsat pulp: nectar.downloaders.threaded:INFO: Download failed: Download of https://dl.packager.io/srv/rpm/zammad/zammad/stable/el/8/x86_64/.treeinfo failed with code 404: Not Found
Apr 25 19:21:22 saydas-rhsat pulp: urllib3.connectionpool:INFO: Starting new HTTPS connection (1): dl.packager.io
Apr 25 19:21:23 saydas-rhsat pulp: nectar.downloaders.threaded:INFO: Download failed: Download of https://dl.packager.io/srv/rpm/zammad/zammad/stable/el/8/x86_64/treeinfo failed with code 404: Not Found
Apr 25 19:21:24 saydas-rhsat pulp: pulp_rpm.plugins.importers.yum.sync:INFO: [c348384b] Sync complete.
~~~


* But with Pulp-3, 

~~~
Apr 25 19:25:56 vm254-192 pulpcore-api: pulp [9b89eca6-a160-424e-a249-53cc23e8e262]:  - - [25/Apr/2022:13:55:56 +0000] "GET /pulp/api/v3/tasks/27638017-b73f-431c-83bf-5c5631ff68ee/ HTTP/1.1" 200 1035 "-" "OpenAPI-Generator/3.14.1/ruby"
Apr 25 19:25:58 vm254-192 pulpcore-api: pulp [9b89eca6-a160-424e-a249-53cc23e8e262]:  - - [25/Apr/2022:13:55:58 +0000] "GET /pulp/api/v3/tasks/27638017-b73f-431c-83bf-5c5631ff68ee/ HTTP/1.1" 200 1035 "-" "OpenAPI-Generator/3.14.1/ruby"

Apr 25 19:25:59 vm254-192 pulpcore-worker-2: pulp [9b89eca6-a160-424e-a249-53cc23e8e262]: pulpcore.tasking.pulpcore_worker:INFO: Task 27638017-b73f-431c-83bf-5c5631ff68ee failed (Package id from primary metadata (1c2d9bfe9af04576a79114f34ac66a494ad5c635c5fc10c1b02f31c896c184ab), does not match package id from filelists, other metadata (51d1a188f1dbed24e59eaec64b7410e8f1dddb69c083f4431332fbaaa352d0b7))

Apr 25 19:25:59 vm254-192 pulpcore-worker-2: pulp [9b89eca6-a160-424e-a249-53cc23e8e262]: pulpcore.tasking.pulpcore_worker:INFO:   File "/usr/lib/python3.6/site-packages/pulpcore/tasking/pulpcore_worker.py", line 339, in _perform_task
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: result = func(*args, **kwargs)
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: File "/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py", line 491, in synchronize
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: version = dv.create()
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: File "/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/declarative_version.py", line 151, in create
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: loop.run_until_complete(pipeline)
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: File "/usr/lib64/python3.6/asyncio/base_events.py", line 484, in run_until_complete
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: return future.result()
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: File "/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 225, in create_pipeline
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: await asyncio.gather(*futures)
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: File "/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 43, in __call__
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: await self.run()
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: File "/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py", line 748, in run
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: await self.parse_repository_metadata(repomd, repomd_files, file_extension)
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: File "/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py", line 802, in parse_repository_metadata
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: file_extension=file_extension,
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: File "/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py", line 1098, in parse_packages
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: for pkg in parser.parse_packages_iterative(file_extension, skip_srpms=skip_srpms):
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: File "/usr/lib/python3.6/site-packages/pulp_rpm/app/metadata_parsing.py", line 271, in parse_packages_iterative
Apr 25 19:25:59 vm254-192 pulpcore-worker-2: ).format(pkgid, pkgid_extra)
~~~

* On a RHEL8 box, I create a .repo file, ran dnf repoinfo and now checking the repodata files inside /var/cache/dnf/zammad-*/repodata :

~~~
# zcat primary.xml.gz | grep 1c2d9bfe9af04576a79114f34ac66a494ad5c635c5fc10c1b02f31c896c184ab -B3 -A1
  <name>zammad</name>
  <arch>x86_64</arch>
  <version epoch="0" ver="3.4.0" rel="1594361885.98561ceb.centos8"/>
  <checksum type="sha256" pkgid="YES">1c2d9bfe9af04576a79114f34ac66a494ad5c635c5fc10c1b02f31c896c184ab</checksum>
  <summary>Zammad is a web based open source helpdesk/customer support system</summary>


# zcat filelists.xml.gz | grep 1c2d9bfe9af04576a79114f34ac66a494ad5c635c5fc10c1b02f31c896c184ab -B1 -A2
</package>
<package pkgid="1c2d9bfe9af04576a79114f34ac66a494ad5c635c5fc10c1b02f31c896c184ab" name="zammad" arch="x86_64">
<version epoch="0" ver="3.4.0" rel="1594361885.98561ceb.centos8"/>
</package>


# zcat primary.xml.gz | grep 51d1a188f1dbed24e59eaec64b7410e8f1dddb69c083f4431332fbaaa352d0b7 -B3 -A1
  <name>zammad</name>
  <arch>x86_64</arch>
  <version epoch="0" ver="5.1.1" rel="1650874122.43aa552d.centos8"/>
  <checksum type="sha256" pkgid="YES">51d1a188f1dbed24e59eaec64b7410e8f1dddb69c083f4431332fbaaa352d0b7</checksum>
  <summary>Zammad is a web based open source helpdesk/customer support system</summary>


# zcat filelists.xml.gz | grep 51d1a188f1dbed24e59eaec64b7410e8f1dddb69c083f4431332fbaaa352d0b7 -B1 -A2
<filelists xmlns="http://linux.duke.edu/metadata/filelists" packages="398">
<package pkgid="51d1a188f1dbed24e59eaec64b7410e8f1dddb69c083f4431332fbaaa352d0b7" name="zammad" arch="x86_64">
<version epoch="0" ver="5.1.1" rel="1650874122.43aa552d.centos8"/>
</package>
~~~

* Only diff I can see is the order of how the packages are listed in both of the metadata files i.e. 

~~~
1c2d9bfe9af04576a79114f34ac66a494ad5c635c5fc10c1b02f31c896c184ab is the first entry in primary.xml.gz but the last entry in filelists.xml.gz 

51d1a188f1dbed24e59eaec64b7410e8f1dddb69c083f4431332fbaaa352d0b7 is the last entry in primary.xml.gz but the first entry in filelists.xml.gz
~~~

* So if pulp3 is trying to match the first pkgid from primary.xml.gz with the first pkgid from filelists.xml.gz , that will always fail and then this error makes sense:

~~~
Package id from primary metadata (1c2d9bfe9af04576a79114f34ac66a494ad5c635c5fc10c1b02f31c896c184ab), does not match package id from filelists, other metadata (51d1a188f1dbed24e59eaec64b7410e8f1dddb69c083f4431332fbaaa352d0b7)
~~~