Unable to add KEA Repo as Product (This field is required)

Problem:
Im not able to add the KEA Repo as Product, as i did for several other 3rd Party Repos.
{‘description’: [ErrorDetail(string=‘This field is required.’, code=‘required’)]}

Expected outcome:
Kea Repo added to Foreman

Foreman and Proxy versions:
Version 3.14.0 (but tried with several Foreman installations, everywhere same Issue)

Distribution and version:
AlmaLinux release 9.6

Other relevant data:

Settings Used for Kea
Upstream URL: https://dl.cloudsmith.io/public/isc/kea-2-6/deb/ubuntu
Releases/Distributions: noble
Components: main:

Error:
Sync fails with

No content added.
Total steps: 5/5

Associating Content: 0/0
Downloading Artifacts: 3/3
Update PackageIndex units: 1/1
Update ReleaseFile units: 1/1

{‘description’: [ErrorDetail(string=‘This field is required.’, code=‘required’)]}

All Description Fields in Product AND repo are filled out, even recreated them via Hammer and still same behavior. Is it possible, there are missing Metadata in KEA repo ?

Download Packages from here

Cloudsmith - Repositories - ISC - Internet Systems Consortium (isc) - kea-2-6 (kea-2-6) - Packages

and upload them as Packages works.

Thx for your help

I was able to reproduce this issue using the following settings:

Upstream URL: https://dl.cloudsmith.io/public/isc/kea-2-6/deb/ubuntu
Releases/Distributions: noble
Architectures: amd64
Download Policy: On Demand

From the Pulp task I get the following trace back:

  error:
    traceback: |2
        File "/usr/lib/python3.11/site-packages/pulpcore/tasking/tasks.py", line 68, in _execute_task
          result = func(*args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.11/site-packages/pulp_deb/app/tasks/synchronizing.py", line 219, in synchronize
          DebDeclarativeVersion(first_stage, repository, mirror=mirror).create()
        File "/usr/lib/python3.11/site-packages/pulpcore/plugin/stages/declarative_version.py", line 163, in create
          loop.run_until_complete(pipeline)
        File "/usr/lib64/python3.11/asyncio/base_events.py", line 654, in run_until_complete
          return future.result()
                 ^^^^^^^^^^^^^^^
        File "/usr/lib/python3.11/site-packages/pulpcore/plugin/stages/api.py", line 220, in create_pipeline
          await asyncio.gather(*futures)
        File "/usr/lib/python3.11/site-packages/pulpcore/plugin/stages/api.py", line 41, in __call__
          await self.run()
        File "/usr/lib/python3.11/site-packages/pulp_deb/app/tasks/synchronizing.py", line 605, in run
          await asyncio.gather(
        File "/usr/lib/python3.11/site-packages/pulp_deb/app/tasks/synchronizing.py", line 750, in _handle_distribution
          await asyncio.gather(*sub_tasks)
        File "/usr/lib/python3.11/site-packages/pulp_deb/app/tasks/synchronizing.py", line 844, in _handle_component
          await asyncio.gather(*pending_tasks)
        File "/usr/lib/python3.11/site-packages/pulp_deb/app/tasks/synchronizing.py", line 1019, in _handle_package_index
          serializer.is_valid(raise_exception=True)
        File "/usr/lib/python3.11/site-packages/rest_framework/serializers.py", line 231, in is_valid
          raise ValidationError(self.errors)
    description: "{'description': [ErrorDetail(string='This field is required.', code='required')]}"

From the error message and also the line of code it fails on, it looks like the Package822Serializer chokes on a package that does not have a description, which is a required field in pulp_deb. I have not yet checked what the Debian policy manual has to say about this, but the fact that we have never encountered this error before suggests that this is at a minimum extremely rare in the wild. I have also not yet figured out if it is just individual packages or all packages from the repo that are affected.

@gekko_swiss Could you open a pulp_deb issue with the above information for now?

1 Like

Debian policy defines it as mandatory for binary packages, if I understand it right: 5. Control files and their fields — Debian Policy Manual v4.7.2.0

So it would say this is why it is implemented like this.

And seeing something like this in the Packages file:


Package: isc-kea
Version: 2.6.0-isc20240525133310
Architecture: amd64
Maintainer: Kea Developers <kea-dev@lists.isc.org>
Installed-Size: 35
Depends: isc-kea-dhcp4 (= 2.6.0-isc20240525133310), isc-kea-dhcp6 (= 2.6.0-isc20240525133310), isc-kea-dhcp-ddns (= 2.6.0-isc20240525133310), isc-kea-ctrl-agent (= 2.6.0-isc20240525133310), isc-kea-admin (= 2.6.0-isc20240525133310), isc-kea-hooks (= 2.6.0-isc20240525133310), isc-kea-doc (= 2.6.0-isc20240525133310)
Conflicts: kea
Section: net
Priority: optional
Homepage: http://kea.isc.org/
 Kea is a DHCPv4, DHCPv6, and DDNS server developed by the Internet Systems
 Consortium which provides very high-performance and supports PostgreSQL, MySQL
 and memfile backends.
 .
 This is a metapackage that provides the Kea DHCPv4, DHCPv6, and DHCP-DDNS
 servers, as well as the Kea Control Agent, Kea admin tools, and all of the
 basic Kea hooks.
Filename: pool/noble/main/i/is/isc-kea_2.6.0-isc20240525133310/isc-kea_2.6.0-isc20240525133310_amd64.deb
Size: 13602
MD5Sum: fbfb8df69f0cc887aa96365ebdfac876
SHA1: 19c11c03840aef8b485ae42140efb0c6c2367926
SHA256: a1da8e9f249e4f2e434bdc0dfcbc3269e6de9209511e5c4b1af9973ed4e6a3c4

It looks really wrong. It looks like there is a description without the header “Description:”. So I would say issue should go to ISC to fix this in their build process.

2 Likes

Good catch! That certainly looks like broken repo metadata.

I wonder if the package itself also contains the broken format in its control file, or if it is only in the package index (a.k.a. Packages file) repo metadata?

Thx for the fast and awesome reply ! :grinning:

At least download the Packages and Upload them as “Files” works.
I will notify ISC and see if they fix it
(let you know)

That suggests the package itself is fine and it is only the repo metadata that contains the issue.

I did File an Issue with KEA, will keep you up2date here

Thx for your help and have a nice day

1 Like